storage: pass encryption options to libroachccl.#20570
storage: pass encryption options to libroachccl.#20570mberhault merged 1 commit intocockroachdb:masterfrom
Conversation
| endif | ||
|
|
||
| CPP_PROTO_ROOT := $(LIBROACH_SRC_DIR)/protos | ||
| CPP_PROTO_CCL_ROOT := $(LIBROACH_SRC_DIR)/protosccl |
There was a problem hiding this comment.
Should this be $(LIBROACH_SRC_DIR)/ccl/protos instead? There's no reason to put it in the base directory.
There was a problem hiding this comment.
either way it kind of stutters. We can have protosccl/ccl/... or ccl/protos/ccl/.... I'm not sure I care enough about generated files though.
| } | ||
|
|
||
| func setupCCLHooks() engine.DBHooks { | ||
| return engine.DBHooks(unsafe.Pointer(C.GetCCLHooks())) |
There was a problem hiding this comment.
eep! I'm still playing with hooks. I'd rather avoid unsafe if I can.
3db97d5 to
e43e2f3
Compare
| CPP_HEADERS := $(subst $(PKG_ROOT),$(CPP_PROTO_ROOT),$(CPP_PROTOS:%.proto=%.pb.h)) | ||
| CPP_SOURCES := $(subst $(PKG_ROOT),$(CPP_PROTO_ROOT),$(CPP_PROTOS:%.proto=%.pb.cc)) | ||
|
|
||
| CPP_PROTOS_CCL := $(filter %ccl/baseccl/encryption_options.proto,$(GO_PROTOS)) |
There was a problem hiding this comment.
I think we may want to split CCL protos out of GO_PROTOS, otherwise we're building with them even in OSS code.
3e28564 to
c058d92
Compare
|
Removed the stdout logging for all but the "found extra options" when encryption flags are passed. |
02618e6 to
a3ca866
Compare
|
This is ready for review. |
a3ca866 to
b648372
Compare
|
Reviewed 10 of 17 files at r1, 1 of 6 files at r3, 5 of 5 files at r4. c-deps/libroach/db.cc, line 49 at r4 (raw file):
s/OpenHook/DBOpenHook/? (or dbOpenHook to match the lowerCase names below) Should this fail if extra_options is non-empty? pkg/ccl/baseccl/encryption_options.proto, line 33 at r4 (raw file):
Unless EncryptionOptions are the only CCL options we ever have that need this treatment, the use of a field named ExtraOptions to pass EncryptionOptions is awkward. I would put a more generic ExtraOptions protobuf around EncryptionOptions to give us space for other CCL options in the future. Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 5 unresolved discussions, all commit checks successful. c-deps/libroach/db.cc, line 49 at r4 (raw file): Previously, bdarnell (Ben Darnell) wrote…
Renamed to I prefer to have the OSS code be blissfully ignorant of pkg/ccl/baseccl/encryption_options.proto, line 33 at r4 (raw file): Previously, bdarnell (Ben Darnell) wrote…
I started out that way but adding a whole extra message we don't need seemed premature. Comments from Reviewable |
b648372 to
c792b1d
Compare
Release Note: none.
CCL-only per-store encryption options are serialized and passed to
libroach through DBOptions.
Upon DBOpen, a hook is run extracting the options in CCL code, doing
nothing in OSS code.
This will eventually initialize encryption-related objects.
A few other things:
* hide encryption flag, it's not ready for use
* generate pb.{cc,h} for CCL protobuf and store in separate path
* print out encryption flags and error out when passed
c792b1d to
a077cb9
Compare
|
Review status: 10 of 16 files reviewed at latest revision, 5 unresolved discussions. c-deps/libroach/db.cc, line 49 at r4 (raw file): Previously, mberhault (marc) wrote…
Nevermind, erroring out just in case someone tries to pass them through. You're right, the extra check doesn't hurt. Comments from Reviewable |
|
Review status: 10 of 16 files reviewed at latest revision, 5 unresolved discussions, all commit checks successful. pkg/ccl/baseccl/encryption_options.proto, line 33 at r4 (raw file): Previously, mberhault (marc) wrote…
Ack, I forgot that this was only used in-process so it can be changed freely. Comments from Reviewable |
Release Note: none.
CCL-only per-store encryption options are serialized and passed to
libroach through DBOptions.
Upon DBOpen, a hook is run extracting the options in CCL code, doing
nothing in OSS code.
This will eventually initialize encryption-related objects.
A few other things: