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

feat: improve datanode snapshot creation #11396

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Commits on Jul 8, 2024

  1. feat: improve datanode snapshot creation

    As of now, the snapshot are created in a sequential and blocking way in the datanode. This means
    that while a snapshot is being taken, no block can be processed.
    
    The following approach is made:
    - the database is locked with a transaction
    - queries are generated
    - one by one the query are:
     - executed
     - the result piped into the file system
    - finally the lock is released, and later the files are added to ipfs.
    
    The bottle neck here is that the results are being save on the fs as they arrive, which is unecessary
    and amount for 95% of the time spent snapshoting (and so blocking anything else).
    
    To prevent this, we keep those results from the database in buffers, and only save them to file via a worker
    go routine.
    
    Cache buffer size in datanode snapshot.
    
    Signed-off-by: Jeremy Letang <[email protected]>
    jeremyletang committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    9a29175 View commit details
    Browse the repository at this point in the history
  2. chore: debug and ssuch

    Signed-off-by: Jeremy Letang <[email protected]>
    jeremyletang committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    9593fa4 View commit details
    Browse the repository at this point in the history
  3. chore wip

    Signed-off-by: Jeremy Letang <[email protected]>
    jeremyletang committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    882fadd View commit details
    Browse the repository at this point in the history