Skip to content
Commit 2e6a2ffa authored by Alexandru Vasile's avatar Alexandru Vasile Committed by GitHub
Browse files

chainHead: Add support for storage pagination and cancellation (#14755)



* chainHead/api: Add `chain_head_unstable_continue` method

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead/subscriptions: Register operations for pagination

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead/subscriptions: Merge limits with registered operation

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead/subscriptions: Expose the operation state

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chain_head/storage: Generate WaitingForContinue event

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead: Use the continue operation

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead/tests: Adjust testing to the new storage interface

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead/config: Make pagination limit configurable

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead/tests: Adjust chainHeadConfig

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead/tests: Check pagination and continue method

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead/api: Add `chainHead_unstable_stopOperation` method

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead/subscription: Add shared atomic state for efficient alloc

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead: Implement operation stop

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead/tests: Check that storage ops can be cancelled

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead/storage: Change docs for query_storage_iter_pagination

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead/subscriptions: Fix merge conflicts

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead: Replace `async-channel` with `tokio::sync`

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

* chainHead/subscription: Add comment about the sender/recv continue

Signed-off-by: default avatarAlexandru Vasile <[email protected]>

---------

Signed-off-by: default avatarAlexandru Vasile <[email protected]>
parent dbb48a5b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment