Adar Dembo has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/12308 )

Change subject: KUDU-2665: LBM may delete containers with live blocks
......................................................................

KUDU-2665: LBM may delete containers with live blocks

Due to the nature of WritableBlock finalization/closing, it's
possible for a container with outstanding WritableBlock instances
to briefly appear as dead.
That's because:
1) The container's next block offset (responsible for determining
   fullness) is incrmented when the WritableBlock is finalized, but
2) The container's live block count is incremented when the
   WritableBlock is closed.
Thus, if the "last" block in a container is deleted after a
WritableBlock was finalized but before it has been closed, the
container will be erroneously marked as dead. When the container's
last referrent disappears, it will be deleted from disk despite
having live blocks in it.

Change-Id: I894f32b1c164ae7770c92171850edd167dfaf8ad
Reviewed-on: http://gerrit.cloudera.org:8080/12308
Reviewed-by: Hao Hao <[email protected]>
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <[email protected]>
---
M src/kudu/fs/log_block_manager-test.cc
M src/kudu/fs/log_block_manager.cc
2 files changed, 103 insertions(+), 19 deletions(-)

Approvals:
  Hao Hao: Looks good to me, approved
  Kudu Jenkins: Verified
  Adar Dembo: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I894f32b1c164ae7770c92171850edd167dfaf8ad
Gerrit-Change-Number: 12308
Gerrit-PatchSet: 5
Gerrit-Owner: helifu <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Hao Hao <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: helifu <[email protected]>

Reply via email to