-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
libroach: further decomposition of db.cc #21636
libroach: further decomposition of db.cc #21636
Conversation
51d88bd
to
124136e
Compare
I think this gets us to a reasonable place. |
Added a few others as reviewers who might have opinions about the organization of code in |
Review status: 0 of 26 files reviewed at latest revision, 1 unresolved discussion, some commit checks pending. c-deps/libroach/ccl/db.cc, line 18 at r2 (raw file):
@benesch Do you know how to avoid these relative includes? Seems like there should be some cmake configuration. Comments from Reviewable |
I'm overall happy with this kind of re-org, just really not while #21580 is pending, this will be a nasty merge. Review status: 0 of 26 files reviewed at latest revision, 1 unresolved discussion, some commit checks pending. c-deps/libroach/ccl/db.cc, line 18 at r2 (raw file): Previously, petermattis (Peter Mattis) wrote…
Things used in common by Comments from Reviewable |
I'll hold off on merging until #21580 goes in. Review status: 0 of 26 files reviewed at latest revision, 1 unresolved discussion, some commit checks pending. Comments from Reviewable |
Reviewed 24 of 24 files at r1, 2 of 2 files at r2. c-deps/libroach/batch.cc, line 33 at r1 (raw file):
nit: weird flow c-deps/libroach/mvcc.cc, line 80 at r1 (raw file):
This is random, but you didn't have any opinions on this, did you? This would be the first time any compiler was wrong about any warning issued to me. Comments from Reviewable |
Review status: all files reviewed at latest revision, 3 unresolved discussions, all commit checks successful. c-deps/libroach/ccl/db.cc, line 18 at r2 (raw file): Previously, mberhault (marc) wrote…
After checking, Comments from Reviewable |
I think this may have gone a little too far towards lots of small files, but i don't have an alternative arrangement to offer. Review status: all files reviewed at latest revision, 3 unresolved discussions, all commit checks successful. Comments from Reviewable |
Split the various engine implementations out of `db.cc`. Move the merge operator routines into `merge.cc`. Move the `MVCC*` routines into `mvcc.cc`. Move the custom RocksDB comparator to `comparator.cc`. Move the cache routines into `cache.cc`. Move the options routines into `options.cc`. This is all code movement: no functional changes. Release note: None
Add an inclusion guard and place the constants in the cockroach namespace. Release note: None
1f213b2
to
c4132e2
Compare
Review status: 23 of 26 files reviewed at latest revision, 3 unresolved discussions. c-deps/libroach/batch.cc, line 33 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Fixed. c-deps/libroach/mvcc.cc, line 80 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
Seems reasonable to me that the compiler can't figure out that Comments from Reviewable |
Reviewed 23 of 24 files at r1, 3 of 3 files at r3, 1 of 2 files at r4. c-deps/libroach/options.h, line 29 at r3 (raw file):
Stray editor-specific config. c-deps/libroach/ccl/db.cc, line 18 at r2 (raw file): Previously, mberhault (marc) wrote…
I'd hesitate to use RocksDB's build system as an example of what to do in general, but agreed, sticking (The relative imports don't bother me though.) Comments from Reviewable |
Release note: None
Per in-person discussion with @mberhault, I'm going to merge this and will help with any conflicts that arise with his PR. |
Review status: 15 of 30 files reviewed at latest revision, 4 unresolved discussions, all commit checks successful. c-deps/libroach/options.h, line 29 at r3 (raw file): Previously, benesch (Nikhil Benesch) wrote…
Ack. I've removed all of these. Comments from Reviewable |
Split the various engine implementations out of
db.cc
. Move the mergeoperator routines into
merge.cc
. Move theMVCC*
routines intomvcc.cc
. Move the custom RocksDB comparator tocomparator.cc
.This is all code movement: no functional changes.
Release note: None