Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve AtlasDB crash and shutdown tolerance #3082

Closed
kantai opened this issue Mar 29, 2022 · 2 comments · Fixed by #3086
Closed

Improve AtlasDB crash and shutdown tolerance #3082

kantai opened this issue Mar 29, 2022 · 2 comments · Fixed by #3086
Assignees

Comments

@kantai
Copy link
Member

kantai commented Mar 29, 2022

One of the issues that #3047 surfaced relates to the resiliency of AtlasDB "attachments" events. These events are pushed from the chains-coordinator thread over a synchronous channel to the p2p thread, which inserts the attachments into the AtlasDB, and includes any newly-fulfilled attachments in the network result struct. This is pushed to the relayer thread, which notifies the event-listener.

When the node shuts down, these events can be lost. Instead, the coordinator thread should be emitting these events in a more resilient way (by writing them to the AtlasDB themselves).

@jcnelson
Copy link
Member

jcnelson commented Apr 4, 2022

The atlas DB writes have to happen in the same (logical) transaction as the transaction that writes out both the Stacks block to the chainstate and the events to the event observer.

At the same time, we need to determine the newly-arrived hashes, which get fed to the event observer, in the same transaction that feeds the block receipts to the event observer.

@kantai kantai linked a pull request Apr 8, 2022 that will close this issue
kantai added a commit that referenced this issue Mar 6, 2023
Improved Atlas shutdown and crash tolerance (#3082)
@kantai
Copy link
Member Author

kantai commented Mar 6, 2023

Closed with #3086

@kantai kantai closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants