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

Triggering snapshots while network is in opening state results in no .committed files #6469

Open
gaurav137 opened this issue Sep 6, 2024 · 2 comments

Comments

@gaurav137
Copy link

gaurav137 commented Sep 6, 2024

CCF network was being created on CACI with Azure File Share backed storage for the read-write ledger and snapshots directory. On taking a snapshot by submitting a trigger snapshot proposal while the network was in opening state resulted in the proposal getting accepted but then saw the following: new ledger files got created. but the previous file was not getting renamed to .committed under the ledgers/ folder and no snapshot files getting created under snapshots/.

@gaurav137 gaurav137 added the bug label Sep 6, 2024
@achamayou
Copy link
Member

@gaurav137 I will add a test that exercises snapshot creation before network open.

File chunking is based on what is set under ledger.chunk_size in the configuration: https://microsoft.github.io/CCF/main/operations/configuration.html#ledger, and the commit watermark. The files are not renamed to .committed until they are closed (i.e. a new chunk has been created), and all entries in the chunk have been committed.

After that point, the next commit will send a ledger_committed message over the ringbuffer to the host:

::consensus::ledger_commit,

void commit(size_t idx)

Which causes the file renaming:

bool commit(size_t idx)

@gaurav137
Copy link
Author

@achamayou File chunking is based on what is set under ledger.chunk_size in the configuration: https://microsoft.github.io/CCF/main/operations/configuration.html#ledger, and the commit watermark. The files are not renamed to .committed until they are closed (i.e. a new chunk has been created), and all entries in the chunk have been committed.
Since I was taking snapshots hence .committed should have appeared immediately as its my understanding that taking of a snapshot forces a generated of .a committed ledger file followed by .committed snapshot file. But what I saw was (quoting from original issue) that new ledger files got created, but the previous file was not getting renamed to .committed under the ledgers/ folder and no snapshot files getting created under snapshots/.

@achamayou achamayou removed the bug label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants