Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Case1
1. client1 open fileA with block1, write some data
2. client2 open fileA with block2, write some data
3. client1 close fileA
4. client2 close fileA
Expected result:
fileA with block2 in keyTable // final fileA data is block2
fileA with block1 in deletedKeyTable // block1 is deleted
Case2
1. client1 open fileA with block1, write some data
2. client2 open fileA with block2, write some data, call hsync, close fileA
3. client1 close fileA
Expected result:
fileA with block1 in keyTable // final fileA data is block1
fileA with block2 in deletedKeyTable // block2 is deleted
Case3:
1. client1 open fileA with block1, write some data
2. client2 open fileA with block2, write some data, call hsync
3. client1 close fileA
4. client2 close fileA
Expected result:
fileA with block1 in keyTable // final fileA data is block1
client2 close fileA should fail
fileA with block2 in deletedKeyTable // block2 is deleted
Case4:
1. client1 open fileA with block1, write some data, call hsync
2. client2 open fileA with block2, write some data, call hsync
3. client1 close fileA
4. client2 close fileA
Expected result:
client1 close call will fail while client2 close will succeed.
final fileA data is block2, block1 will be delted.
The overall rule is
a. the later commit overwrites early commit
b. avoid mutual overwrites. Once a file is overwritten, it cannot later overwritten others again.
To support this, when a hsynced file is overwritten, it will have "overwritten" metadata as a flag. All following allocate block, further hsync or commit of this file will fail.
Attachments
Attachments
Issue Links
- duplicates
-
HDDS-10736 [hsync] OMKeyCommitRequest should reject if client id doesn't match
- Resolved
- fixes
-
HDDS-10736 [hsync] OMKeyCommitRequest should reject if client id doesn't match
- Resolved
- is related to
-
HDDS-10670 [Hsync] OverWrite using "sh key put" shouldn't be allowed on hsynced files.
- Resolved
-
HDDS-10675 [Hsync] OverWrite using "sh key cp" shouldn't be allowed on hsynced files.
- Resolved
- links to