Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/19445 )
Change subject: [WIP]KUDU-1945 Update auto incrementing counter during bootstrap ...................................................................... Patch Set 2: (7 comments) http://gerrit.cloudera.org:8080/#/c/19445/2//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/19445/2//COMMIT_MSG@14 PS2, Line 14: In this scenario the WAL segments are replayed and since each insert : operation entry has auto incrementing counter which will be used for : the insert operations present in that entry, as long as we have the : latest insert operation entry in the WAL segments, the auto : incrementing counter is populated correctly during bootstrap. Just wanted to make sure: is that working as expected when WAL contains non-replicated ops that are to be discarded because the majority of replicas eventually converged on different history of operations after reconciling of the WAL? http://gerrit.cloudera.org:8080/#/c/19445/2//COMMIT_MSG@20 PS2, Line 20: 2. WAL segments do not contain insert operations : In the case, we need to fetch the highest auto incrementing counter : value present in the data which is already flushed and update the : in memory auto incrementing counter appropriately. This patch : accomplishes this task. What if current snapshot of the data in the tablet doesn't have a single row? Is it safe to assume we can start the auto-incrementing counter with 0 in that case? http://gerrit.cloudera.org:8080/#/c/19445/2//COMMIT_MSG@25 PS2, Line 25: Testing has been done manually It would be great to add test coverage to make sure this works as expected in both cases. Covering the case of a tablet that has been copied over from one tablet server to another could be a great addition as well. Automating these testing is a good idea since it would allow to catch regressions, if any. Otherwise, I don't think anybody has a capacity to test this manually every Kudu release. http://gerrit.cloudera.org:8080/#/c/19445/2/src/kudu/tablet/tablet.cc File src/kudu/tablet/tablet.cc: http://gerrit.cloudera.org:8080/#/c/19445/2/src/kudu/tablet/tablet.cc@433 PS2, Line 433: schema()->has_auto_incrementing() Would be great to add a comment why this is safe to look just at the current schema version for the presence of the auto-increment column. http://gerrit.cloudera.org:8080/#/c/19445/2/src/kudu/tablet/tablet.cc@440 PS2, Line 440: 32 * 1024 Could you add a comment to explain why 32K is used here for the row block memory size? http://gerrit.cloudera.org:8080/#/c/19445/2/src/kudu/tablet/tablet.cc@449 PS2, Line 449: nit: drop the space ? http://gerrit.cloudera.org:8080/#/c/19445/2/src/kudu/tablet/tablet.cc@453 PS2, Line 453: LOG(INFO) << "Setting AIC from data to: "<< counter; I think this might look confusing. First, there might be be multiple diskrowsets for a tablet. Second, there isn't information on the tablet ID in the output. With that, why to output this at all? -- To view, visit http://gerrit.cloudera.org:8080/19445 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I61b305efd7d5a065a2976327567163956c0c2184 Gerrit-Change-Number: 19445 Gerrit-PatchSet: 2 Gerrit-Owner: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Wenzhe Zhou <[email protected]> Gerrit-Comment-Date: Thu, 02 Mar 2023 20:14:34 +0000 Gerrit-HasComments: Yes
