Ádám Bakai has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/20901


Change subject: [log_block_manager] Write lock for deletion
......................................................................

[log_block_manager] Write lock for deletion

Both removing blocks and compacting metadata manipulates the
live_blocks_ value and file content. This way it can happen that on
thread A live_blocks_ is updated, on thread B metadata is
compacted and live_blocks_ value is overwritten, then thread A writes
deletion records in the metadata file. This way it creates inconsistency
between file content and live_blocks_ value, which leads to incorrect
behaviour to skip compaction later.
This fix makes sure that CompactMetadata and deletion can not overlap
each other.

Change-Id: I73712a5fd8eccf23621f8abda3e99ebdf10a769f
---
M src/kudu/fs/log_block_manager.cc
1 file changed, 2 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/01/20901/1
--
To view, visit http://gerrit.cloudera.org:8080/20901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I73712a5fd8eccf23621f8abda3e99ebdf10a769f
Gerrit-Change-Number: 20901
Gerrit-PatchSet: 1
Gerrit-Owner: Ádám Bakai <aba...@cloudera.com>

Reply via email to