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

Conversation

anirbanr-fb
Copy link
Contributor

The final pull request for Blob Storage.

Summary: 1. Options Class.

2. Impl class BlobDBImpl
3. made BlobDB::Open

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
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:
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:
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:
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:
Summary: 1. Options Class.

2. Impl class BlobDBImpl
3. made BlobDB::Open

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
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:
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:
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:
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:
Summary:
1. column family support
2. proper sequence numbers
3. GC threads
4. Fsync In different schedule

Test Plan:

Reviewers:
Summary: Reindenting parts of file. Reorganizing code.

Test Plan:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
reads than writes

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
Summary:

1. Read Write Locks.
2. Reduce critical section during writes
3. valgrind runs and fixes

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
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:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
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:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
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:
Summary:
Also using make format to reformat changes

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
Summary: This callback ensures that before a flush happens
blob log files are also fsync'd

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
…DB::Open

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
anirbanr-fb and others added 8 commits May 8, 2017 21:49
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
…ckable DB work easier

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
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:
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Blame Revision:
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:
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:
@facebook-github-bot
Copy link
Contributor

@yiwu-arbug has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@siying siying left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows build is not passing and we don't know OSX because it is broken by another PR. Feel free to check-in as long as @yiwu-arbug approves it.

@@ -0,0 +1,240 @@
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly, cc_options.cc should have already been moved to options/.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@yiwu-arbug
Copy link
Contributor

Didn't notice the Windows failures.. if there's any failure remaining I'll fix in another patch.

facebook-github-bot pushed a commit that referenced this pull request May 11, 2017
Summary:
Some of the file from #2269 didn't add to CMake file. Adding them to fix window build.
Closes #2276

Differential Revision: D5043487

Pulled By: yiwu-arbug

fbshipit-source-id: 4eba853e9d92574353abce21d77d30e47ce43d3d
yiwu-arbug pushed a commit that referenced this pull request May 11, 2017
Summary:
The final pull request for Blob Storage.
Closes #2269

Differential Revision: D5033189

Pulled By: yiwu-arbug

fbshipit-source-id: 6356b683ccd58cbf38a1dc55e2ea400feecd5d06
yiwu-arbug pushed a commit that referenced this pull request May 11, 2017
Summary:
Some of the file from #2269 didn't add to CMake file. Adding them to fix window build.
Closes #2276

Differential Revision: D5043487

Pulled By: yiwu-arbug

fbshipit-source-id: 4eba853e9d92574353abce21d77d30e47ce43d3d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants