-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
batcheval: absorb command registration #20329
Conversation
This cleanup is really satisfying to follow! Reviewed 38 of 38 files at r1. pkg/storage/cclglue.go, line 25 at r1 (raw file):
Why not handle this here as well? pkg/storage/helpers_test.go, line 474 at r1 (raw file):
Never mind, but I'd still push for an pkg/storage/replica_command.go, line 160 at r1 (raw file):
I know you're going to get to this soon, but could you add a TODO here? pkg/storage/batcheval/cmd_begin_transaction.go, line 34 at r1 (raw file):
Consider a TODO to unexport this when EndTxn is moved into pkg/storage/batcheval/cmd_conditional_put.go, line 29 at r1 (raw file):
Do these functions need to be exported? pkg/storage/batcheval/cmd_deprecated_verify_checksum.go, line 26 at r1 (raw file):
nit: Why declare any keys for this command? pkg/storage/batcheval/cmd_lease.go, line 32 at r1 (raw file):
The linter might yell at you about this long line. pkg/storage/batcheval/cmd_resolve_intent_test.go, line 36 at r1 (raw file):
nit: move up pkg/storage/batcheval/cmd_scan.go, line 30 at r1 (raw file):
Consider creating typedefs of these two functions and sharing between here and pkg/storage/batcheval/cmd_scan.go, line 52 at r1 (raw file):
Why not just create a Comments from Reviewable |
Review status: all files reviewed at latest revision, 10 unresolved discussions, some commit checks failed. pkg/storage/cclglue.go, line 25 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
I take it back, pkg/storage/helpers_test.go, line 474 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. pkg/storage/replica_command.go, line 160 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. pkg/storage/batcheval/cmd_begin_transaction.go, line 34 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. (elsewhere) pkg/storage/batcheval/cmd_conditional_put.go, line 29 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
no, but I decided to leave them exported because they are the meat of what this package provides. We don't really spend a lot of time looking at godoc, but if we did, we'd want to see them and their comments. pkg/storage/batcheval/cmd_deprecated_verify_checksum.go, line 26 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
You could take it a step further and ask "why not delete this command". We can probably delete this, but I'd rather not do it as a drive-by and have thus opted to preserve the existing code verbatim. pkg/storage/batcheval/cmd_lease.go, line 32 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
The linter and I are friends. pkg/storage/batcheval/cmd_resolve_intent_test.go, line 36 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. pkg/storage/batcheval/cmd_scan.go, line 30 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
I'm not a huge fan of typedefs for fns because all they usually do is add an extra hop to look at what you're actually supposed to pass. I'll leave as is in this instance. pkg/storage/batcheval/cmd_scan.go, line 52 at r1 (raw file): Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Done. Comments from Reviewable |
Reviewed 10 of 10 files at r2. Comments from Reviewable |
You'll notice that `EndTransaction` is still lingering in `replica_command.go`, but that will be done in a follow-up. Touches cockroachdb#18779.
You'll notice that
EndTransaction
is still lingering inreplica_command.go
,but that will be done in a follow-up.
Touches #18779.