-
Notifications
You must be signed in to change notification settings - Fork 565
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
Split files into smaller chunks when replicating snapshots #12795
Comments
ZDP-Triage:
|
ZDP-Planning:
|
Notes: The implementation of this will come in two parts the sender PR and the receiver PR. The sender: The receiver: This involves adding support for chunks which only contain parts of files, currently correctness checks occur where file existence is taken as a failure however with chunked file snapshots this no longer holds these checks will be removed or refactored. In addition there is the question of checksums, before each chunk was a file and the file snapshot was provided. Currently the new implementation would involve snapshots of the file chunks. I think this is a fine solution, if we know all the file parts are not corrupted the full file should be correct? Open to thoughts on this. Lastly there will need to be changes to how files are written per chunk as now a chunk could represent not just a new file to create and write but also appending content to a file. |
Have you also looked into how to make these changes with out breaking rolling update? |
Yes changing |
## Description This will result in split file snapshot chunks being sent to a broker which supports it. Changes: - Install Response, added a `preferredChunKSize` field which defaults to 0 for old versions. - Changed `FileBasedSnapshotChunkReader.next()` to instead read files chunk by chunk. - Added `chunkSize` field to the `FileBasedSnapshotChunkReader`. - Changed `FileBasedSnapshotChunkReader.nextId()` from a `<file-name>` to `<file name>-<file-part>` format e.g. file-1, file-2. - Added `fileBlockPosition` and `totalFileSize` field to `SnapshotChunk` in order to aid in processing on the receiver side as it is useful to know the current position in the file for next expected chunk checks and total file size for any completion actions when all blocks have been received for example file flushing. (Can be calculated with data.length, position and file size if it is the last chunk for a given file) ## Related issues Sender side of #12795
## Description Add config support for chunk size. closes #12795
## Description Add config support for chunk size. closes #12795
## Description Built on the changes in #19361 as new chunk fields are needed. - [ ] Removed file existence checks as they will fail for chunked files. - [ ] Now writes file using the chunk position so order of chunks doesn't matter (for writing files will still fail checksums) - [ ] Now support partially building metadata if file is chunked. - [ ] Now enforces order of chunks using `chunkId` in `PassiveRole` ## Related issues closes #12795
Description
A snapshot consists of multiple files. When replicating a snapshot, we put one file into a single request. This can cause issues because it takes longer to send the request and can hit the configured timeout. In high latency networks this can happen more frequent. We have configured max file sizes for rocksdb. Even then the files can be upto 64MB.
A better way to handle it is to split each files to smaller chunks, and send one small chunk at a time. Smaller packets are faster to send. Besides, this also lowers memory footprint, as we don't have to load the whole file into memory. This might also help to relax the limit on rocksdb sst file size.
relates to https://jira.camunda.com/browse/SUPPORT-16901
The text was updated successfully, but these errors were encountered: