Adar Dembo has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8144 )

Change subject: KUDU-2055 [part 3]: Refactor BlockCreationTransaction and 
BlockDeletionTransaction
......................................................................


Patch Set 10:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/8144/10/src/kudu/fs/block_manager.h
File src/kudu/fs/block_manager.h:

http://gerrit.cloudera.org:8080/#/c/8144/10/src/kudu/fs/block_manager.h@289
PS10, Line 289:   // Add a block to the creation transaction. This method is 
not thread-safe.
I don't think it's appropriate for threads to share BlockCreationTransaction or 
BlockDeletionTransaction. Each thread should use its own transaction, or use 
external synchronization to safely share a single instance. So, rather than 
calling out just the Add methods as being thread unsafe, could you document 
that the classes themselves aren't thread safe?


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

http://gerrit.cloudera.org:8080/#/c/8144/8/src/kudu/fs/log_block_manager.cc@1152
PS8, Line 1152:     std::unique_ptr<WritableBlock> block) {
> Done, but I kept "std::vector<std::unique_ptr<LogWritableBlock>> created_bl
Well, both pieces of state is definitely worse than just one, so I'd rather 
revert to the old approach or figure out what's wrong with the new one:
1. L1160 is cosmetic; it could just as easily VLOG about the number of 
containers with commited blocks.
2. L1162 can be changed to a double for loop to iterate on every block. Not a 
big deal.
3. What's the additional transformation needed on L1176? It's already iterating 
over created_block_map; am I missing something?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I60c7d437061f98ad27b9aecda5fa89e909fb2ec6
Gerrit-Change-Number: 8144
Gerrit-PatchSet: 10
Gerrit-Owner: Hao Hao <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Hao Hao <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Comment-Date: Tue, 10 Oct 2017 22:59:32 +0000
Gerrit-HasComments: Yes

Reply via email to