Todd Lipcon has posted comments on this change.

Change subject: block_manager: consolidate data directory management
......................................................................


Patch Set 2:

(9 comments)

http://gerrit.cloudera.org:8080/#/c/4793/2/src/kudu/fs/data_dirs.cc
File src/kudu/fs/data_dirs.cc:

PS2, Line 310:   do {
             :     cur_idx = data_dirs_next_.Load();
             :     next_idx = (cur_idx + 1) % data_dirs_.size();
             :   } while (!data_dirs_next_.CompareAndSet(cur_idx, next_idx));
             : 
             :  
since there's no longer a check against "full paths" here, I think you could 
just use Increment() and always mod the result by data_dirs_.size(), instead of 
reimplementing increment via CAS


Line 318: DataDir* DataDirManager::FindDataDirByUuidIndex(uint16_t uuid_idx) 
const {
any kind of CHECK you can do to make sure it's already opened?


Line 323:   return FindCopy(uuid_idx_by_data_dir_, dir, uuid_idx);
here too


http://gerrit.cloudera.org:8080/#/c/4793/2/src/kudu/fs/data_dirs.h
File src/kudu/fs/data_dirs.h:

Line 93:   // Initializes the data directories on disk.
can you specify what happens if they already exist?


Line 94:   Status Create(bool test_hole_punch, bool fsync);
would a flags set be a more readable choice here?


Line 97:   Status Open(int max_data_dirs, LockMode mode);
doc 'max_data_dirs'


PS2, Line 103: uuid index,
maybe a call-out here to where the idea of 'uuid index' is defined? I don't 
remember what this term means.


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

PS2, Line 241: full_root_paths
rename this and update docs


Line 285:   // Success or failure is set in 'result_status'.
why not return Status?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifc9d8999117a6383e7487b6c5bf065f10247b1d7
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-HasComments: Yes

Reply via email to