Hello Jean-Daniel Cryans,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/5024
to review the following change.
Change subject: log block manager: fix when append exceeds preallocated space
......................................................................
log block manager: fix when append exceeds preallocated space
In commit abea8c6 I added a DCHECK to enforce the assumption that a
container's preallocation offset is always ahead of its append offset. This
turns out to be wrong when very large values are written, or when the
preallocation size is tuned down (as it is in disk_reservation-itest.cc).
The effect: disk_reservation-itest.cc failed from time to time because the
tserver crashed too early.
So let's throw that away, and let's also adjust the preallocation algorithm
slightly: when we preallocate, we take the write offset into account. If
it's greater than the preallocation offset, we preallocate again, and we do
so from the write offset.
The new test crashes 100% of the time without the fix.
Change-Id: I99460d35e355abf843c965d3c2b4309cba24eadd
---
M src/kudu/fs/block_manager-test.cc
M src/kudu/fs/log_block_manager.cc
2 files changed, 29 insertions(+), 8 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/24/5024/1
--
To view, visit http://gerrit.cloudera.org:8080/5024
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I99460d35e355abf843c965d3c2b4309cba24eadd
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Jean-Daniel Cryans <[email protected]>