Grant Henke has posted comments on this change. Change subject: env: add ReadV() API ......................................................................
Patch Set 1: (5 comments) http://gerrit.cloudera.org:8080/#/c/6779/1/src/kudu/fs/block_manager.h File src/kudu/fs/block_manager.h: Line 152: // Reads exactly the "results" aggregate bytes, based on each Slices "size", > Slice's Done http://gerrit.cloudera.org:8080/#/c/6779/1/src/kudu/util/env.h File src/kudu/util/env.h: Line 387: // Reads up to the "results" aggregate size, based on each Slices "size", > Slice's Done Line 527: // Reads up to the "results" aggregate size, based on each Slices "size", > Slice's Done http://gerrit.cloudera.org:8080/#/c/6779/1/src/kudu/util/env_posix.cc File src/kudu/util/env_posix.cc: Line 312: Status DoReadV(int fd, const string& filename, uint64_t offset, vector<Slice>* results) { > One other note: iovs from the iov array are "consumed" from front to back, Yeah, thats a good idea. I think I can convert to an iov and use/adjust it for all the requests. I don't think its as simple as the preadv psuedo code you gave though. If I understand preadv correctly, the number of bytes read could be a partial within a single iovec. That means I can't just shift by completed iovec's. Instead I need to shift the buffer and length within a partial iovec. This is what I was doing in the slice with: Slice next_result(result.mutable_data() + bytes_rem, result.size() - bytes_rem); Line 328: transform(wip_results.begin(), wip_results.end(), iov, [&](Slice curr) { > I think ref-based iteration (Slice&) is acceptable here, as you did on L357 Done -- To view, visit http://gerrit.cloudera.org:8080/6779 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib8f7a62c8363b40baa064d9e63be1ece506f1e48 Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Grant Henke <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Reviewer: Tidy Bot Gerrit-HasComments: Yes
