-
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: add basic encryption stats. #25850
libroach: add basic encryption stats. #25850
Conversation
Review status: 0 of 28 files reviewed at latest revision, all discussions resolved. c-deps/libroach/engine.cc, line 216 at r1 (raw file):
It feels a bit weird for Note that in other places we pass stats from C++ to Go using C structs. For example, c-deps/libroach/testutils.h, line 24 at r1 (raw file):
I think you need to mark this as inline. It's ok to place templated methods in a header, but for non-templated methods if you don't mark them as inline you can hit problems during linking with multiple definitions. This is dependent on the linker (i.e. it succeed on Linux but fail on Windows). pkg/server/serverpb/status.proto, line 609 at r1 (raw file):
I'm guessing tamird isn't going to get to this. Let's either remote the TODO or put someone else's name there. pkg/storage/engine/engine.go, line 347 at r1 (raw file):
Comments from Reviewable |
Reviewed 28 of 28 files at r1. Comments from Reviewable |
Review status: all files reviewed at latest revision, 4 unresolved discussions. c-deps/libroach/engine.cc, line 216 at r1 (raw file): Previously, petermattis (Peter Mattis) wrote…
The problem here is that the OSS code doesn't have access to the proto, it's deeply CCL only. This serialized proto is generated in This is an unfortunate thing we've had to do over and over again for encryption due to the many components that need to talk to each other through OSS. c-deps/libroach/testutils.h, line 24 at r1 (raw file): Previously, petermattis (Peter Mattis) wrote…
Done. pkg/server/serverpb/status.proto, line 609 at r1 (raw file): Previously, petermattis (Peter Mattis) wrote…
Removed TODO. pkg/storage/engine/engine.go, line 347 at r1 (raw file): Previously, petermattis (Peter Mattis) wrote…
Done. And shrunk to Comments from Reviewable |
New endpoint: `/_status/stores` which for now only returns the store ID and encryption stats. The encryption stats is a serialized protobuf containing active key information (but not the key itself). This will be handled by CCL UI code since it needs access to CCL protos. Release note: None
875600d
to
8d2ae81
Compare
Can we add an end-to-end test in the CCL code that the new endpoint returns non-empty encryption status? Review status: 23 of 28 files reviewed at latest revision, 2 unresolved discussions, all commit checks successful. c-deps/libroach/engine.cc, line 216 at r1 (raw file): Previously, mberhault (marc) wrote…
Ack. It doesn't seem problematic for the OSS code to define an encryption stats struct that is used by CCL. If you leave the code as-is, at least add a comment alluding to the hoops which are causing this structure. Update: I completely missed that the stats fields are c-deps/libroach/ccl/db.cc, line 42 at r2 (raw file):
Nit: no need for the explicit c-deps/libroach/ccl/db.cc, line 45 at r2 (raw file):
Transferring ownership is surprising. I'm also surprised you don't need any locking here. Seems like calling pkg/storage/engine/engine.go, line 347 at r1 (raw file): Previously, mberhault (marc) wrote…
Nit: you've got some spurious spaces after the word "serialized". Comments from Reviewable |
bors r=bdarnell |
25850: libroach: add basic encryption stats. r=bdarnell a=mberhault New endpoint: `/_status/stores` which for now only returns the store ID and encryption stats. The encryption stats is a serialized protobuf containing active key information (but not the key itself). This will be handled by CCL UI code since it needs access to CCL protos. Release note: None Co-authored-by: marc <marc@cockroachlabs.com>
Build succeeded |
Was this merged prematurely? I didn't see an LGTM or an approved. My comment below about locking needs an answer. Am I missing something? Review status: 23 of 28 files reviewed at latest revision, 4 unresolved discussions, all commit checks successful. Comments from Reviewable |
uh. oops. that was definitely premature. I'll address the nits in a followup PR. The locking isn't needed though. Review status: 23 of 28 files reviewed at latest revision, 4 unresolved discussions, all commit checks successful. c-deps/libroach/engine.cc, line 216 at r1 (raw file): Previously, petermattis (Peter Mattis) wrote…
There's a struct for the returns from c-deps/libroach/ccl/db.cc, line 42 at r2 (raw file): Previously, petermattis (Peter Mattis) wrote…
Good point. Removing in upcoming PR. c-deps/libroach/ccl/db.cc, line 45 at r2 (raw file): Previously, petermattis (Peter Mattis) wrote…
The object returned by pkg/storage/engine/engine.go, line 347 at r1 (raw file): Previously, petermattis (Peter Mattis) wrote…
oops. fixing in upcoming PR. Comments from Reviewable |
Nothing major, followups to premature merge of cockroachdb#25850 Release note: None
26044: misc: fix encryption stats nits. r=mberhault a=mberhault Nothing major, followups to premature merge of #25850 Release note: None 26048: tpccbench: fix existing dataset fast-path r=nvanbenschoten a=nvanbenschoten This skewed with #24735, which changed the output of `information_schema` when connecting to an implicit database. Release note: None Co-authored-by: marc <marc@cockroachlabs.com> Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
Review status: 23 of 28 files reviewed at latest revision, 4 unresolved discussions, all commit checks successful. c-deps/libroach/ccl/db.cc, line 45 at r2 (raw file): Previously, mberhault (marc) wrote…
Ah, the comment was confusing me. It sounds like you're transferring ownership from Comments from Reviewable |
New endpoint:
/_status/stores
which for now only returns the store IDand encryption stats.
The encryption stats is a serialized protobuf containing active key
information (but not the key itself).
This will be handled by CCL UI code since it needs access to CCL protos.
Release note: None