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

Change subject: KUDU-3371 [fs] make LogBlockContainer a base class
......................................................................


Patch Set 4:

(5 comments)

http://gerrit.cloudera.org:8080/#/c/19610/4/src/kudu/fs/log_block_manager.h
File src/kudu/fs/log_block_manager.h:

http://gerrit.cloudera.org:8080/#/c/19610/4/src/kudu/fs/log_block_manager.h@70
PS4, Line 70: ContainerLiveBlocksByName
nit: there is no 'liveliness' context in here, isn't it?  Maybe, name this just 
ContainerBlocksByName ?


http://gerrit.cloudera.org:8080/#/c/19610/4/src/kudu/fs/log_block_manager.h@352
PS4, Line 352: virtual Status Repair
Making this virtual along with DoRepair() seems a bit of an overkill.  Would it 
be enough to make just DoRepair() a virtual method?


http://gerrit.cloudera.org:8080/#/c/19610/4/src/kudu/fs/log_block_manager.h@366
PS4, Line 366: Do the repair work.
It's not quite clear how this is different from the Repair() method.  It would 
be great to provide a better insight in the comment.


http://gerrit.cloudera.org:8080/#/c/19610/4/src/kudu/fs/log_block_manager.h@538
PS4, Line 538: container
Would be great to document the expectations on 'container' when this method 
returns non-OK status: is it always null/non-valid or it can valid?  If the 
latter, in what cases?


http://gerrit.cloudera.org:8080/#/c/19610/4/src/kudu/fs/log_block_manager.cc
File src/kudu/fs/log_block_manager.cc:

http://gerrit.cloudera.org:8080/#/c/19610/4/src/kudu/fs/log_block_manager.cc@2879
PS4, Line 2879:     if (!s.ok()) {
              :       if (first_failure.ok()) {
              :         first_failure = s.CloneAndPrepend("Unable to append 
deletion record(s) to block metadata");
              :       }
              :       // Purge the blocks that failed to delete.
              :       clbs.resize(deleted_block_ids.size());
              :     } else {
              :       container->PostWorkOfBlocksDeleted();
              :     }
readability nit: consider rewriting this as

if (s.ok()) {
  container->PostWorkOfBlocksDeleted();
} else {
  // many lines ...
  ...
}



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieb199de95973aaeba76947ad095907272d84ca67
Gerrit-Change-Number: 19610
Gerrit-PatchSet: 4
Gerrit-Owner: Yingchun Lai <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Ashwani Raina <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: KeDeng <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Wang Xixu <[email protected]>
Gerrit-Reviewer: Yifan Zhang <[email protected]>
Gerrit-Reviewer: Yingchun Lai <[email protected]>
Gerrit-Reviewer: Yuqi Du <[email protected]>
Gerrit-Comment-Date: Sat, 10 Jun 2023 00:14:55 +0000
Gerrit-HasComments: Yes

Reply via email to