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

Blob storage pr #2269

Closed
wants to merge 38 commits into from
Closed

Commits on May 9, 2017

  1. Adding an options class for BlobDB and also Impl class.

    Summary: 1. Options Class.
    
    2. Impl class BlobDBImpl
    3. made BlobDB::Open
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    586cc5e View commit details
    Browse the repository at this point in the history
  2. Header for blob db file and move blobs under a directory

    Summary:
    1. Header for Blob DB file. version/magic #/ttl etc
    2. some more options
    3. move blob db under a configurable directory
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    1236402 View commit details
    Browse the repository at this point in the history
  3. Creating a Blob Log reader writer from WAL reader/writer

    Summary: to get better control over the header and the blob
    log, replicating the code from WAL log reader/writer.
    
    Will have to figure out later, if this functionality can be merged
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    800147a View commit details
    Browse the repository at this point in the history
  4. support for PutWithTTL and PutUntil.

    Summary: Optimized file formats for blobs with proper headers
    and footers. BlobDB::Open with support for reading the footers
    at open time and building the in-memory metadata.
    
    Test Plan: Rebased the blob db test on top of the changes.
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    841fa14 View commit details
    Browse the repository at this point in the history
  5. improved file selection for TTL and reuse files after Open

    Summary:
    
    1. If files were still open on shutdown, reuse them by opening
       in append mode.
    
    2. slightly more robust file selection heuristic (Still naive).
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    fbbb4f3 View commit details
    Browse the repository at this point in the history
  6. Adding an options class for BlobDB and also Impl class.

    Summary: 1. Options Class.
    
    2. Impl class BlobDBImpl
    3. made BlobDB::Open
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    85008bf View commit details
    Browse the repository at this point in the history
  7. Header for blob db file and move blobs under a directory

    Summary:
    1. Header for Blob DB file. version/magic #/ttl etc
    2. some more options
    3. move blob db under a configurable directory
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    c71fb4d View commit details
    Browse the repository at this point in the history
  8. Creating a Blob Log reader writer from WAL reader/writer

    Summary: to get better control over the header and the blob
    log, replicating the code from WAL log reader/writer.
    
    Will have to figure out later, if this functionality can be merged
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    e495b4e View commit details
    Browse the repository at this point in the history
  9. support for PutWithTTL and PutUntil.

    Summary: Optimized file formats for blobs with proper headers
    and footers. BlobDB::Open with support for reading the footers
    at open time and building the in-memory metadata.
    
    Test Plan: Rebased the blob db test on top of the changes.
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    d6670b9 View commit details
    Browse the repository at this point in the history
  10. improved file selection for TTL and reuse files after Open

    Summary:
    
    1. If files were still open on shutdown, reuse them by opening
       in append mode.
    
    2. slightly more robust file selection heuristic (Still naive).
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    bb97952 View commit details
    Browse the repository at this point in the history
  11. Several sets of improvements

    Summary:
    1. column family support
    2. proper sequence numbers
    3. GC threads
    4. Fsync In different schedule
    
    Test Plan:
    
    Reviewers:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    19aa9a3 View commit details
    Browse the repository at this point in the history
  12. enforcing 80 column limit.

    Summary: Reindenting parts of file. Reorganizing code.
    
    Test Plan:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    d386a42 View commit details
    Browse the repository at this point in the history
  13. Adding a mutex to BlobFile. Better critical sections.

    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    5e65993 View commit details
    Browse the repository at this point in the history
  14. Shared pointer changes

    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    4736f77 View commit details
    Browse the repository at this point in the history
  15. Moving to Read Write Locks for top level mutex. Many more

    reads than writes
    
    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    83259d2 View commit details
    Browse the repository at this point in the history
  16. adding delete handler. Minor fixes

    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    453075c View commit details
    Browse the repository at this point in the history
  17. Incremental changes (e.g. Read Write Locks )

    Summary:
    
    1. Read Write Locks.
    2. Reduce critical section during writes
    3. valgrind runs and fixes
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    2ac7825 View commit details
    Browse the repository at this point in the history
  18. stackable db fix. more rigorous unit test

    Summary:
    
    1. unit test with lot of random blobs
    2. stackable db should not take ownership of base db,
       because we share with blob db.
    3. fixing ttl_guess logic for now, to make sure search
       doesn't miss files.
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    0fb6b3c View commit details
    Browse the repository at this point in the history
  19. simple delete eviction loop.

    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    98ed0cf View commit details
    Browse the repository at this point in the history
  20. BREAK from delete eviction loop, when you meet a DELETE

    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    61fc81f View commit details
    Browse the repository at this point in the history
  21. debugged and fixed issues with sequential file buffers. Rewind

    Summary:
    1. sequential file buffer management
    2. rewind functionality
    3. some logs for error cases.
    4. making the time range of a blob log pick up correct option
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    0be66a3 View commit details
    Browse the repository at this point in the history
  22. Reorganizing functions to share with regular no-TTL put

    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    54b910b View commit details
    Browse the repository at this point in the history
  23. Minor Code tweaks

    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    57b4b3f View commit details
    Browse the repository at this point in the history
  24. Clipping start and end ttls of files

    Summary:
    1. align the ttl start and end to multiples of ttl_range
       this keeps the ttl range of files tractable and non-overlapping
    
    2. remove an option from options file
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    6f823f3 View commit details
    Browse the repository at this point in the history
  25. Adding a timer queue. Minor changes.

    Summary:
    Also using make format to reformat changes
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    ec1fcea View commit details
    Browse the repository at this point in the history
  26. Reformat and parc lint

    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    70d1a17 View commit details
    Browse the repository at this point in the history
  27. Factor out shouldGCFile. Partial file gc

    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    eeb7589 View commit details
    Browse the repository at this point in the history
  28. Adding support for OnFlushBegin listener

    Summary: This callback ensures that before a flush happens
    blob log files are also fsync'd
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    8037851 View commit details
    Browse the repository at this point in the history
  29. Assertions in sequential read and write logs for safety

    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    916716a View commit details
    Browse the repository at this point in the history
  30. Framework for WAL-filter callback. BlobDB needs to be created before …

    …DB::Open
    
    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    c754683 View commit details
    Browse the repository at this point in the history
  31. DestroyBlobDB and another unit test for GC

    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    29ac599 View commit details
    Browse the repository at this point in the history
  32. Delete simple and complex blob test. Adding Put Interface to make sta…

    …ckable DB work easier
    
    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    75de09e View commit details
    Browse the repository at this point in the history
  33. Single Delete, Multi Get and Write handling

    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    af6f56f View commit details
    Browse the repository at this point in the history
  34. making set of open files a multiset.

    Summary:
    1. open files are now a multiset.
    2. fixing minor race condition between async closeSeqFiles
       and Put
    3. more diagnostics and asserts
    4. removing lambda's for debug simplicity
    5. providig a functor for TTL extraction
    
    Test Plan: db_bench
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    ce27f0e View commit details
    Browse the repository at this point in the history
  35. Fixing Lint issues and code review feedback

    Summary:
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    3824584 View commit details
    Browse the repository at this point in the history
  36. Supported for override callback during compaction

    Summary: Added a callback which informs the keys that are being
    compacted. No Filtering. The EvictAllVersions compaction filter,
    registers the packet into a lockless queue and marks the blogs
    evicted
    
    Test Plan: OverrideTest added to blob_db_test
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    4c39e0b View commit details
    Browse the repository at this point in the history
  37. Addressing review comments from Siying and Murali

    Summary:
    
    Review comments from Siying, Murali, Yuslepukhin and Lichuang
    1. Relocating files from db area to utilities area
    2. Replacing DecodeFixed32/64 and offset calculation with GetFixed32/64
    3. removing invalid comments from blob_log_writer.h
    4. changing comment style
    5. doing make_format again
    6. changing the enum style
    7. directory fsync on file add and delete
    8. putting magic number as last field in footer
    9. Making Header Construct use PutFixed32 instead of Encode...
    10. Added CRC checks on Get
    11. Removing extra option in options.h for flush_begin_listener
    12. removing raw pointers from blob log format
    13. Removing has_ttl and has_ts and replacing with single unique_ptr
    14. Appveyor and Travis failures
    15. Better APIs for Column Families. Simplifying interfaces.
    16. Compression of Blob Support
    17. Splitting into multiple files, to reduce file size
    18. GC transaction 1 at a time, instead of all at once
    19. Proper bookkeeping of deletes after open of db(crash safety)
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Blame Revision:
    anirbanr-fb authored and Yi Wu committed May 9, 2017
    Configuration menu
    Copy the full SHA
    04a9f0b View commit details
    Browse the repository at this point in the history
  38. rebase onto latest master, clang format, writable file fix. Removing …

    …Rewind
    Yi Wu authored and anirbanr-fb committed May 9, 2017
    Configuration menu
    Copy the full SHA
    c17ee21 View commit details
    Browse the repository at this point in the history