[ASTERIXDB-2738][STO] Create Mask File Before Merge Operations
authorMurtadha Hubail <mhubail@apache.org>
Thu, 21 May 2020 18:29:46 +0000 (21:29 +0300)
committerMurtadha Hubail <mhubail@apache.org>
Fri, 22 May 2020 00:39:11 +0000 (00:39 +0000)
commitfe0f6fa181b03195cda8ff3585734ce10f466467
tree7ff3e67a2025f259bebdf96d02f2035552a608da
parent0f407d9224c92a2a5d571dcd53873da9c287021f
[ASTERIXDB-2738][STO] Create Mask File Before Merge Operations

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Before starting a merge operation, create a mask file
  (.mask_C_startSeq_endSeq) for the merged component to
  indicate that this component isn't valid yet.
- On the merge operation successful completion, delete the
  merged component mask file.
- In the case of any unexpected failure during the merge
  operation, all files of the failed merged component will
  be deleted on node startup/shutdown, including the mask
  file.
- Halt on any IO opeartion failure.
- Add a test case that ensures only masked merged components
  are deleted but not the original components that were
  supposed to be merged.

Change-Id: I476dd3be5e75468e83044b3aaf0f6c2d8beadf1c
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/6425
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
Reviewed-by: Luo Chen <cluo8@uci.edu>
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/HaltCallback.java
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/storage/PersistentLocalResourceRepositoryTest.java
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/LSMIOOperationCallback.java
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/storage/ResourceReference.java
asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/messaging/ComponentMaskTask.java
asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ExitUtil.java