Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19698 )

Change subject: [tools] KUDU-1945 Print auto-incrementing counter in kudu wal 
dump
......................................................................


Patch Set 2:

(10 comments)

http://gerrit.cloudera.org:8080/#/c/19698/2/src/kudu/common/wire_protocol-test-util.h
File src/kudu/common/wire_protocol-test-util.h:

http://gerrit.cloudera.org:8080/#/c/19698/2/src/kudu/common/wire_protocol-test-util.h@25
PS2, Line 25: #include <kudu/client/schema.h>
This should moved into the section of local included below.


http://gerrit.cloudera.org:8080/#/c/19698/2/src/kudu/common/wire_protocol-test-util.h@39
PS2, Line 39: inline client::KuduSchema GetAutoIncrementingTestSchema() {
nit: add an empty line to separate this definition of the new function from the 
function definition above


http://gerrit.cloudera.org:8080/#/c/19698/2/src/kudu/common/wire_protocol-test-util.h@40
PS2, Line 40: kSchema
nit: why this fancy naming for a local variable?


http://gerrit.cloudera.org:8080/#/c/19698/2/src/kudu/common/wire_protocol-test-util.h@45
PS2, Line 45: b.Build(&kSchema);
This returns Status, so it should be handled appropriately.  Maybe, wrap this 
into CHECK_OK() at least?


http://gerrit.cloudera.org:8080/#/c/19698/2/src/kudu/tools/kudu-tool-test.cc
File src/kudu/tools/kudu-tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/19698/2/src/kudu/tools/kudu-tool-test.cc@2688
PS2, Line 2688:
nit: wrong indent?


http://gerrit.cloudera.org:8080/#/c/19698/2/src/kudu/tools/kudu-tool-test.cc@2691
PS2, Line 2691: 0, // schema_version
nit: could use the same notation for commenting on the parameter names as in 
other lines for this call site?


http://gerrit.cloudera.org:8080/#/c/19698/2/src/kudu/tools/kudu-tool-test.cc@2702
PS2, Line 2702: 0
Could we use some other non-zero number to be able to spot some issues with 
non-properly initialized proto fields elsewhere (e.g., 0x5a)?


http://gerrit.cloudera.org:8080/#/c/19698/2/src/kudu/tools/kudu-tool-test.cc@2704
PS2, Line 2704:    AddTestRowToPB(RowOperationsPB::INSERT, schema,
              :                    opid.index(),
              :                    0,
              :                    "this is a test insert",
              :                    write->mutable_row_operations());
Could we have a case where at least two rows are written, so we could see that 
the auto-incrementing counter comes out incrementing, indeed?


http://gerrit.cloudera.org:8080/#/c/19698/2/src/kudu/tools/kudu-tool-test.cc@2805
PS2, Line 2805:
nit: remove the extra empty line


http://gerrit.cloudera.org:8080/#/c/19698/2/src/kudu/tools/tool_action_common.cc
File src/kudu/tools/tool_action_common.cc:

http://gerrit.cloudera.org:8080/#/c/19698/2/src/kudu/tools/tool_action_common.cc@351
PS2, Line 351:   if (write.has_auto_incrementing_column()) {
             :     int64_t auto_incrementing_counter =
             :         
write.auto_incrementing_column().auto_incrementing_counter();
             :     
RETURN_NOT_OK(dec.DecodeOperations<DecoderMode::WRITE_OPS>(&ops, 
&auto_incrementing_counter));
Why do we need this if auto_incrementing_counter value is discarded after 
exiting out of the if(){} scope?



--
To view, visit http://gerrit.cloudera.org:8080/19698
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4e807aaef48683ec7c5317eecdedf8e6e15950e2
Gerrit-Change-Number: 19698
Gerrit-PatchSet: 2
Gerrit-Owner: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Comment-Date: Fri, 07 Apr 2023 02:34:02 +0000
Gerrit-HasComments: Yes

Reply via email to