Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
252 commits
Select commit Hold shift + click to select a range
252d338
HDDS-13627. In memory Manager for Snapshot Local Data
swamirishi Oct 9, 2025
4099bc6
HDDS-13767. Refactor SnapshotLocalDataYaml related code into OmSnapsh…
swamirishi Oct 9, 2025
e02670c
HDDS-13767. Fix pmd
swamirishi Oct 9, 2025
5a66cfc
Merge remote-tracking branch 'origin/HDDS-13767' into HEAD
swamirishi Oct 9, 2025
79580e9
HDDS-13627. Fix checkstyle
swamirishi Oct 9, 2025
2a331ef
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 9, 2025
c4f69e2
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 10, 2025
afbc592
HDDS-13627. Add tests
swamirishi Oct 10, 2025
70ac2c7
HDDS-13783. Implement locks for OmSnapshotLocalDataManager
swamirishi Oct 12, 2025
b554cc7
HDDS-13783. Implement locks for OmSnapshotLocalDataManager
swamirishi Oct 12, 2025
49eccfa
HDDS-13783. Refactor inline variable
swamirishi Oct 12, 2025
51eda04
HDDS-13627. Refactor map data structure
swamirishi Oct 13, 2025
25f766c
Merge remote-tracking branch 'origin/HDDS-13627' into HEAD
swamirishi Oct 13, 2025
96689fa
HDDS-13783. Add more condition to upsert
swamirishi Oct 13, 2025
0674299
HDDS-13783. Add java doc comment
swamirishi Oct 13, 2025
5d9fc49
HDDS-13783. Add java doc comment
swamirishi Oct 13, 2025
2d88176
HDDS-13783. Implement full lock
swamirishi Oct 13, 2025
a3c4c69
HDDS-13783. Refactor and move modify method into WritableOmSnapshotLo…
swamirishi Oct 13, 2025
686d0c7
HDDS-13783. Make full lock non static
swamirishi Oct 13, 2025
491a54b
HDDS-13783. Fix remove
swamirishi Oct 13, 2025
5e69ee9
HDDS-13627. Fix findbugs
swamirishi Oct 13, 2025
d36622a
HDDS-13785. Remove orphan versions from SnapshotLocalData Yaml file
swamirishi Oct 14, 2025
ee213d1
HDDS-13785. Fix findbugs
swamirishi Oct 14, 2025
81871b2
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 14, 2025
a95604e
HDDS-13627. Fix tests
swamirishi Oct 14, 2025
5a90fcf
HDDS-13627. remove checksum interface
swamirishi Oct 14, 2025
20d7d6a
HDDS-13627. Fix test failures
swamirishi Oct 14, 2025
ae655cb
HDDS-13785. Set defrag flag on previous snapshotId update
swamirishi Oct 14, 2025
25fa6ae
Merge remote-tracking branch 'origin/HDDS-13627' into HEAD
swamirishi Oct 14, 2025
d419283
HDDS-13783. Fix findbugs
swamirishi Oct 14, 2025
8a44308
HDDS-13783. Fix pmd
swamirishi Oct 14, 2025
cb94c36
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 14, 2025
e26052c
Merge remote-tracking branch 'origin/HDDS-13627' into HEAD
swamirishi Oct 14, 2025
4d272d1
HDDS-13783. Fix lock release
swamirishi Oct 14, 2025
2a38f59
HDDS-13627. address review comments
swamirishi Oct 14, 2025
ca098cf
HDDS-13783. Make graph updates synchronized
swamirishi Oct 15, 2025
67d4b3d
HDDS-13627. Make add version with dependents package private
swamirishi Oct 15, 2025
9838cda
Merge remote-tracking branch 'origin/HDDS-13627' into HEAD
swamirishi Oct 15, 2025
6a19dbb
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 15, 2025
665f411
HDDS-13783. Fix checkstyle
swamirishi Oct 15, 2025
2894e40
HDDS-13783. Fix merge conflict
swamirishi Oct 15, 2025
ea0ab16
HDDS-13783. Add write version api
swamirishi Oct 15, 2025
915562b
HDDS-13797. Refactor OzoneManagerLock Resource class to handle handle…
swamirishi Oct 15, 2025
1c0d0ac
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 15, 2025
24da3eb
HDDS-13797. Update interface
swamirishi Oct 15, 2025
8f3774a
HDDS-13798. Implement PoolBasedHierarchicalResourceLockManager for Hi…
swamirishi Oct 15, 2025
503cd4e
Merge remote-tracking branch 'origin/HDDS-13798' into HEAD
swamirishi Oct 15, 2025
6865fad
HDDS-13797. Revert move of Leveled Resource and Resource enum/interface
swamirishi Oct 15, 2025
903ecd1
Merge remote-tracking branch 'origin/HDDS-13797' into HEAD
swamirishi Oct 15, 2025
06d1e99
Merge remote-tracking branch 'origin/HDDS-13798' into HEAD
swamirishi Oct 15, 2025
60a7728
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 15, 2025
4711517
HDDS-13798. Fix pmd findbugs
swamirishi Oct 15, 2025
af8754c
Merge remote-tracking branch 'origin/HDDS-13798' into HEAD
swamirishi Oct 15, 2025
655a724
HDDS-13798. Fix pmd findbugs
swamirishi Oct 15, 2025
6386c1b
Merge remote-tracking branch 'origin/HDDS-13798' into HEAD
swamirishi Oct 15, 2025
2bc6134
HDDS-13798. Fix ozone-default.xml
swamirishi Oct 16, 2025
0de7c62
Merge remote-tracking branch 'origin/HDDS-13798' into HEAD
swamirishi Oct 16, 2025
8e8c534
HDDS-13798. Stop lock data manager on metadata stop
swamirishi Oct 16, 2025
f148f24
HDDS-13798. Update tests
swamirishi Oct 16, 2025
da030c0
HDDS-13798. Rename class
swamirishi Oct 16, 2025
6af6498
Merge remote-tracking branch 'origin/HDDS-13798' into HEAD
swamirishi Oct 16, 2025
b281569
HDDS-13783. Add tests
swamirishi Oct 16, 2025
1ad24b4
HDDS-13783. Fix checkstyle
swamirishi Oct 16, 2025
d629911
HDDS-13783. Fix findbugs
swamirishi Oct 16, 2025
2aecde4
Merge remote-tracking branch 'origin/HDDS-13783' into HEAD
swamirishi Oct 16, 2025
8eeb44b
HDDS-13783. Fix pmd
swamirishi Oct 16, 2025
d9301b3
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 16, 2025
06e7d37
HDDS-13785. Fix merge issue
swamirishi Oct 16, 2025
efd6c51
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 16, 2025
fab85ea
HDDS-13785. Fix checkstyle
swamirishi Oct 16, 2025
c73a355
HDDS-13783. Fix test
swamirishi Oct 16, 2025
76b99e2
Merge remote-tracking branch 'origin/HDDS-13783' into HEAD
swamirishi Oct 16, 2025
1d39bee
HDDS-13785. Fix test
swamirishi Oct 16, 2025
54f1508
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 16, 2025
b1a3834
HDDS-13785. Fix test
swamirishi Oct 16, 2025
1986bbe
HDDS-13785. Fix conditions
swamirishi Oct 16, 2025
52be3dd
HDDS-13783. Allow version resolution to null
swamirishi Oct 16, 2025
5f50a04
Merge remote-tracking branch 'origin/HDDS-13783' into HEAD
swamirishi Oct 16, 2025
908c47d
HDDS-13785. Fix tests
swamirishi Oct 17, 2025
278605a
HDDS-13783. Add dirty bit
swamirishi Oct 17, 2025
40265e1
Merge remote-tracking branch 'origin/HDDS-13783' into HEAD
swamirishi Oct 17, 2025
ac4719b
Merge
swamirishi Oct 17, 2025
cf19dce
HDDS-13783. Address review comments
swamirishi Oct 17, 2025
34097de
HDDS-13783. Address review comments
swamirishi Oct 17, 2025
c46ddc2
HDDS-13783. Address review comments
swamirishi Oct 17, 2025
99afc02
HDDS-13783. Address review comments
swamirishi Oct 17, 2025
fcc630e
Merge remote-tracking branch 'origin/HDDS-13783' into HEAD
swamirishi Oct 17, 2025
6f144e2
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 17, 2025
4600c96
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 18, 2025
48ec0bb
HDDS-13810. Fix Build Issue because of unused dependency
swamirishi Oct 18, 2025
f524cad
Merge remote-tracking branch 'origin/HDDS-13810' into HEAD
swamirishi Oct 18, 2025
cb31b7c
Revert "HDDS-13810. Fix Build Issue because of unused dependency"
swamirishi Oct 19, 2025
02dd061
Merge remote-tracking branch 'origin/HDDS-13783' into HEAD
swamirishi Oct 19, 2025
ff90af8
HDDS-13785. Add unit tests
swamirishi Oct 20, 2025
8b014dd
HDDS-13783. Add case for commit key in middle of chain
swamirishi Oct 20, 2025
57662c6
HDDS-13783. Convert set to list of predecessors
swamirishi Oct 20, 2025
bcc0fc8
Merge remote-tracking branch 'origin/HDDS-13783' into HEAD
swamirishi Oct 20, 2025
79a46f4
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 23, 2025
cd24a81
Merge remote-tracking branch 'origin/HDDS-13783' into HEAD
swamirishi Oct 23, 2025
5f0bb91
HDDS-13833. Add transactionInfo field in SnapshotLocalData and update…
swamirishi Oct 24, 2025
3de4346
Merge remote-tracking branch 'origin/HDDS-13833' into HEAD
swamirishi Oct 24, 2025
5b55a59
HDDS-13785. Merge with HDDS-13833
swamirishi Oct 24, 2025
aa6facf
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 24, 2025
cc35056
HDDS-13783. Make local data graph synchrnous
swamirishi Oct 25, 2025
9c1689c
Merge remote-tracking branch 'origin/HDDS-13783' into HEAD
swamirishi Oct 25, 2025
3f59895
HDDS-13785. Use internal lock on orphan block cleanup
swamirishi Oct 25, 2025
95341dd
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 27, 2025
616bef3
HDDS-13783. Fix NPE with concurrentHashMap
swamirishi Oct 27, 2025
b0023d1
HDDS-13830. Snapshot Rocks DB directory path computation based on loc…
swamirishi Oct 28, 2025
36b6fb3
HDDS-13830. Add test
swamirishi Oct 28, 2025
4596386
HDDS-13783. Add comments for localDataGraph
swamirishi Oct 29, 2025
7af6521
Merge remote-tracking branch 'origin/HDDS-13783' into HEAD
swamirishi Oct 29, 2025
e19dae2
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 29, 2025
8c1373a
Merge remote-tracking branch 'origin/HDDS-13833' into HEAD
swamirishi Oct 29, 2025
25ee4e2
Merge remote-tracking branch 'origin/HDDS-13783' into HEAD
swamirishi Oct 29, 2025
c6e3914
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 29, 2025
fd4bfdb
HDDS-13785. Add test for handling needs defrag
swamirishi Oct 30, 2025
49f4424
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 30, 2025
613d106
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 30, 2025
8a29736
HDDS-13833. Fix checkstyle
swamirishi Oct 30, 2025
cca2dbf
Merge remote-tracking branch 'origin/HDDS-13833' into HEAD
swamirishi Oct 30, 2025
a810cc1
HDDS-13785. Fix findbugs
swamirishi Oct 30, 2025
78c1036
HDDS-13859. OmSnapshotLocalDataManager should handle needsDefrag flag…
swamirishi Oct 31, 2025
a2bbea5
Merge remote-tracking branch 'origin/HDDS-13859' into HEAD
swamirishi Oct 31, 2025
bf4746f
HDDS-13859. Fix Test
swamirishi Oct 31, 2025
09d955c
HDDS-13859. Add comments
swamirishi Oct 31, 2025
cde567d
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 31, 2025
49c662a
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 31, 2025
2cf1bce
HDDS-13859. Fix test after merge master
swamirishi Oct 31, 2025
7afc8f5
Merge remote-tracking branch 'origin/HDDS-13859' into HEAD
swamirishi Oct 31, 2025
5849dac
HDDS-13785. Fix tests after merge
swamirishi Oct 31, 2025
e58ff09
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 31, 2025
83b887e
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Oct 31, 2025
519495a
HDDS-13785. Address review comments
swamirishi Oct 31, 2025
c125250
HDDS-13785. Address review comments
swamirishi Oct 31, 2025
408e213
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 1, 2025
715b2f0
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 1, 2025
ec59b89
HDDS-13785. Address review comments
swamirishi Nov 1, 2025
b0b6d6a
HDDS-13785. Address review comments
swamirishi Nov 1, 2025
a759807
HDDS-13785. Change catch exception
swamirishi Nov 1, 2025
808b174
HDDS-13785. Address review comments
swamirishi Nov 1, 2025
c829a8b
HDDS-13830. Fix test
swamirishi Nov 1, 2025
8e91e47
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 1, 2025
bfd341c
HDDS-13830. Fix test
swamirishi Nov 1, 2025
4ccd3fc
HDDS-13830. Fix test
swamirishi Nov 1, 2025
4fd3b0e
HDDS-13849. Refactor getTablePrefix function in SnapshotDiff flow
swamirishi Nov 1, 2025
41b7cfb
HDDS-13830. Fix pmd
swamirishi Nov 1, 2025
3a8c8f6
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 2, 2025
d0422ae
HDDS-13830. Fix mrge issue
swamirishi Nov 2, 2025
4ff8cea
Merge remote-tracking branch 'origin/HDDS-13830' into HEAD
swamirishi Nov 2, 2025
649468d
Merge remote-tracking branch 'origin/HDDS-13849' into HEAD
swamirishi Nov 3, 2025
bb5139f
HDDS-13452. Prevent snapshot defrag from happening before upgrade fin…
swamirishi Nov 3, 2025
c46e1ae
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 3, 2025
298ae36
HDDS-13849. Fix test
swamirishi Nov 3, 2025
8e43b90
Merge remote-tracking branch 'origin/HDDS-13849' into HEAD
swamirishi Nov 3, 2025
55c68bd
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 3, 2025
d1d04cf
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 3, 2025
974b5c2
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 3, 2025
018571c
HDDS-13785. Address review comments
swamirishi Nov 5, 2025
6cd54dd
HDDS-13785. Address review comments
swamirishi Nov 5, 2025
261a669
HDDS-13785. Remove unnecessary read lock
swamirishi Nov 5, 2025
8955d80
Merge remote-tracking branch 'origin/HDDS-13785' into HEAD
swamirishi Nov 6, 2025
ac88692
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 6, 2025
91c143a
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 6, 2025
151e887
HDDS-13867. SnapshotDiff delta file computation should happen based o…
swamirishi Nov 8, 2025
3771ff4
HDDS-13901. OmSnaphshotLocalDataManager should throw IOException if u…
swamirishi Nov 9, 2025
0736d82
Merge remote-tracking branch 'origin/HDDS-13901' into HEAD
swamirishi Nov 10, 2025
894a047
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 10, 2025
5823347
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 10, 2025
e3c9a94
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 10, 2025
6fbf8c7
HDDS-13849. Address review comments
swamirishi Nov 10, 2025
ed007a4
Merge remote-tracking branch 'origin/HDDS-13849' into HEAD
swamirishi Nov 10, 2025
43923cb
Merge remote-tracking branch 'origin/HDDS-13849' into HEAD
swamirishi Nov 10, 2025
ea64602
HDDS-13849. Address review comments
swamirishi Nov 10, 2025
0b16ef6
Merge remote-tracking branch 'origin/HDDS-13849' into HEAD
swamirishi Nov 10, 2025
1507659
HDDS-13849. Address review comments
swamirishi Nov 10, 2025
4c2a175
Merge remote-tracking branch 'origin/HDDS-13849' into HEAD
swamirishi Nov 10, 2025
e2d5e83
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 11, 2025
9d4dd26
HDDS-13867. Fix Snaphsot dag diff exception handling
swamirishi Nov 11, 2025
d696ffa
HDDS-13912. Modularise Snapshot Delta file computer (Full Diff)
swamirishi Nov 11, 2025
8523dea
HDDS-13912. Fix create link logic
swamirishi Nov 12, 2025
9ee0298
HDDS-13912. Fix findbugs
swamirishi Nov 12, 2025
1d771e0
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 13, 2025
121977e
Merge remote-tracking branch 'origin/HDDS-13867' into HEAD
swamirishi Nov 13, 2025
9736247
HDDS-13867. Fix bug
swamirishi Nov 13, 2025
2167b03
HDDS-13867. Add test
swamirishi Nov 14, 2025
08156e4
HDDS-13867. Address review comments
swamirishi Nov 14, 2025
84a0352
Merge remote-tracking branch 'origin/HDDS-13867' into HEAD
swamirishi Nov 14, 2025
8890252
HDDS-13912. Address review comments
swamirishi Nov 14, 2025
1067935
HDDS-13912. Fix interface
swamirishi Nov 14, 2025
b086376
HDDS-13912. Fix exception message
swamirishi Nov 14, 2025
4b1cf63
HDDS-13929. Modularise Snapshot Delta file computer (Efficient Diff)
swamirishi Nov 17, 2025
9b2d4f8
HDDS-13929. Fix PMD
swamirishi Nov 17, 2025
a495846
HDDS-13949. Move dbTxSequenceNumber from SnapshotInfo to LocalDataYam…
swamirishi Nov 17, 2025
74fff7b
HDDS-13930. Snapshot diff can use rocksdb iterator instead of using m…
swamirishi Nov 18, 2025
90c28de
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 18, 2025
df34dd1
Merge remote-tracking branch 'origin/HDDS-13912' into HEAD
swamirishi Nov 18, 2025
9d59f6d
Merge remote-tracking branch 'origin/HDDS-13929' into HEAD
swamirishi Nov 18, 2025
1caba02
Merge remote-tracking branch 'origin/HDDS-13949' into HEAD
swamirishi Nov 18, 2025
1e04711
HDDS-13929. Fix findbugs
swamirishi Nov 18, 2025
db0b5de
Merge remote-tracking branch 'origin/HDDS-13929' into HEAD
swamirishi Nov 18, 2025
6fc9a2c
HDDS-13949. Fix findbugs
swamirishi Nov 18, 2025
4cff0d1
Merge remote-tracking branch 'origin/HDDS-13949' into HEAD
swamirishi Nov 18, 2025
ed8ee79
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 18, 2025
ecb5084
Merge remote-tracking branch 'origin/HDDS-13912' into HEAD
swamirishi Nov 18, 2025
632c009
Merge remote-tracking branch 'origin/HDDS-13929' into HEAD
swamirishi Nov 18, 2025
d044ad8
Merge remote-tracking branch 'origin/HDDS-13949' into HEAD
swamirishi Nov 18, 2025
b1525f1
HDDS-13009. Background snapshot defrag service
swamirishi Nov 19, 2025
1201350
HDDS-13929. Fix javadoc
swamirishi Nov 19, 2025
505d6c5
Merge remote-tracking branch 'origin/HDDS-13929' into HEAD
swamirishi Nov 19, 2025
2f5c5c7
Merge remote-tracking branch 'origin/HDDS-13949' into HEAD
swamirishi Nov 19, 2025
403253f
Merge remote-tracking branch 'origin/HDDS-13930' into HEAD
swamirishi Nov 19, 2025
edf0213
HDDS-13949. Add back snapshotPath init removed by mistake
swamirishi Nov 19, 2025
8aa35bb
Merge remote-tracking branch 'origin/HDDS-13949' into HEAD
swamirishi Nov 19, 2025
4315fdc
Merge remote-tracking branch 'origin/HDDS-13930' into HEAD
swamirishi Nov 19, 2025
4619003
HDDS-13009. Fix creation of tmp directory
swamirishi Nov 19, 2025
25d3367
HDDS-13009. Binary search to delete all older directories
swamirishi Nov 19, 2025
5363388
HDDS-13009. Fix comment
swamirishi Nov 19, 2025
5c3efca
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 19, 2025
42ca3d7
HDDS-13929. Fix comment
swamirishi Nov 19, 2025
faa1380
HDDS-13929. Change error log to warn
swamirishi Nov 19, 2025
d3f3836
Merge remote-tracking branch 'origin/HDDS-13929' into HEAD
swamirishi Nov 19, 2025
f489860
Merge remote-tracking branch 'origin/HDDS-13949' into HEAD
swamirishi Nov 19, 2025
1857b88
Merge remote-tracking branch 'origin/HDDS-13930' into HEAD
swamirishi Nov 19, 2025
903f237
HDDS-13009. Commit the updated snapshot to ensure needsDefrag gets set
swamirishi Nov 20, 2025
ee66820
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 20, 2025
4a36e98
HDDS-13949. Address review comments from HDDS-13929
swamirishi Nov 20, 2025
140af62
Merge remote-tracking branch 'origin/HDDS-13949' into HEAD
swamirishi Nov 20, 2025
e85b6a6
Merge remote-tracking branch 'origin/HDDS-13930' into HEAD
swamirishi Nov 20, 2025
124810f
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 20, 2025
91f727c
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 20, 2025
2817b29
Merge remote-tracking branch 'origin/HDDS-13930' into HEAD
swamirishi Nov 20, 2025
f04c934
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 22, 2025
302b083
HDDS-13009. Commit the updated snapshot to ensure needsDefrag gets set
swamirishi Nov 22, 2025
6b856b7
HDDS-13009. Remove sst filtered flag dependency
swamirishi Nov 22, 2025
bfbc38a
HDDS-13978. OMLockDetails should not be used as the object returns a …
swamirishi Nov 22, 2025
6518866
Merge remote-tracking branch 'origin/HDDS-13978' into HEAD
swamirishi Nov 22, 2025
1d399ae
HDDS-13009. Move classes
swamirishi Nov 23, 2025
843a1db
HDDS-13993. Refactor and move SnapshotDefragService to snapshot package
swamirishi Nov 24, 2025
448f274
Merge remote-tracking branch 'origin/HDDS-13993' into HEAD
swamirishi Nov 24, 2025
c731798
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 24, 2025
f4c4fcd
HDDS-13009. Fix delete range bug
swamirishi Nov 24, 2025
7d07377
HDDS-13009. Move deletion of snapshot directories outside of snapshot…
swamirishi Nov 24, 2025
cd2e529
HDDS-13009. Add unit test for needsDefrag method
swamirishi Nov 24, 2025
e8d1d8b
HDDS-13009. Split performIncrementalDefragmentation function into sma…
swamirishi Nov 24, 2025
f7426fd
HDDS-13009. Fix map grouping part in perform incremental Defragmentation
swamirishi Nov 24, 2025
74c486a
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi Nov 24, 2025
47682b4
HDDS-13009. Fix pmd findbugs
swamirishi Nov 24, 2025
fc32f6f
HDDS-13009. Fix checkstyle
swamirishi Nov 25, 2025
0572a12
HDDS-13009. Fix snapshot cache lock
swamirishi Nov 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ <KEY, VALUE> TypedTable<KEY, VALUE> getTable(
*/
Map<Integer, String> getTableNames();

/**
* Drop the specific table.
* @param tableName - Name of the table to truncate.
*/
void dropTable(String tableName) throws RocksDatabaseException;

/**
* Get data written to DB since a specific sequence number.
*/
Expand All @@ -162,4 +168,6 @@ DBUpdatesWrapper getUpdatesSince(long sequenceNumber, long limitCount)
* @return true if the DB is closed.
*/
boolean isClosed();

String getSnapshotsParentDir();
}
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ public String getSnapshotMetadataDir() {
return dbLocation.getParent() + OM_KEY_PREFIX + OM_SNAPSHOT_DIFF_DIR;
}

@Override
public String getSnapshotsParentDir() {
return snapshotsParentDir;
}
Expand Down Expand Up @@ -332,6 +333,29 @@ public Map<Integer, String> getTableNames() {
return db.getColumnFamilyNames();
}

/**
/**
* Drops a table from the database by removing its associated column family.
* <p>
* <b>Warning:</b> This operation should be used with extreme caution. If the table needs to be used again,
* it is recommended to reinitialize the entire DB store, as the column family will be permanently
* removed from the database. This method is suitable for truncating a RocksDB column family in a single operation.
*
* @param tableName the name of the table to be dropped
* @throws RocksDatabaseException if an error occurs while attempting to drop the table
*/
@Override
public void dropTable(String tableName) throws RocksDatabaseException {
ColumnFamily columnFamily = db.getColumnFamily(tableName);
if (columnFamily != null) {
try {
db.getManagedRocksDb().get().dropColumnFamily(columnFamily.getHandle());
} catch (RocksDBException e) {
throw new RocksDatabaseException("Failed to drop " + tableName, e);
}
}
}

public Collection<ColumnFamily> getColumnFamilies() {
return db.getExtraColumnFamilies();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import com.google.common.annotations.VisibleForTesting;
import java.io.IOException;
import java.nio.file.Path;
import java.time.Duration;
import java.util.Iterator;
import java.util.List;
Expand Down Expand Up @@ -85,6 +86,13 @@ public interface OMMetadataManager extends DBStoreHAManager, AutoCloseable {
@VisibleForTesting
DBStore getStore();

/**
* Retrieves the parent directory of all the snapshots in the system.
*
* @return a Path object representing the parent directory of the snapshot.
*/
Path getSnapshotParentDir();

/**
* Returns the OzoneManagerLock used on Metadata DB.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,14 @@ public void startSnapshotDefragService(OzoneConfiguration conf) {
OZONE_SNAPSHOT_DEFRAG_SERVICE_TIMEOUT_DEFAULT,
TimeUnit.MILLISECONDS);

snapshotDefragService =
new SnapshotDefragService(serviceInterval, TimeUnit.MILLISECONDS,
serviceTimeout, ozoneManager, conf);
snapshotDefragService.start();
try {
snapshotDefragService =
new SnapshotDefragService(serviceInterval, TimeUnit.MILLISECONDS,
serviceTimeout, ozoneManager, conf);
snapshotDefragService.start();
} catch (IOException e) {
LOG.error("Error starting Snapshot Defrag Service", e);
}
} else {
LOG.info("SnapshotDefragService is disabled. Snapshot defragmentation will not run periodically.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ protected OmMetadataManagerImpl() {

public static OmMetadataManagerImpl createCheckpointMetadataManager(
OzoneConfiguration conf, DBCheckpoint checkpoint) throws IOException {
return createCheckpointMetadataManager(conf, checkpoint, true);
}

public static OmMetadataManagerImpl createCheckpointMetadataManager(
OzoneConfiguration conf, DBCheckpoint checkpoint, boolean readOnly) throws IOException {
Path path = checkpoint.getCheckpointLocation();
Path parent = path.getParent();
if (parent == null) {
Expand All @@ -246,7 +251,11 @@ public static OmMetadataManagerImpl createCheckpointMetadataManager(
throw new IllegalStateException("DB checkpoint dir name should not "
+ "have been null. Checkpoint path is " + path);
}
return new OmMetadataManagerImpl(conf, dir, name.toString());
return new OmMetadataManagerImpl(conf, dir, name.toString(), readOnly);
}

protected OmMetadataManagerImpl(OzoneConfiguration conf, File dir, String name) throws IOException {
this(conf, dir, name, true);
}

/**
Expand All @@ -257,15 +266,15 @@ public static OmMetadataManagerImpl createCheckpointMetadataManager(
* @param name - Checkpoint directory name.
* @throws IOException
*/
protected OmMetadataManagerImpl(OzoneConfiguration conf, File dir, String name)
protected OmMetadataManagerImpl(OzoneConfiguration conf, File dir, String name, boolean readOnly)
throws IOException {
lock = new OmReadOnlyLock();
hierarchicalLockManager = new ReadOnlyHierarchicalResourceLockManager();
omEpoch = 0;
int maxOpenFiles = conf.getInt(OZONE_OM_SNAPSHOT_DB_MAX_OPEN_FILES, OZONE_OM_SNAPSHOT_DB_MAX_OPEN_FILES_DEFAULT);

this.store = newDBStoreBuilder(conf, name, dir)
.setOpenReadOnly(true)
.setOpenReadOnly(readOnly)
.disableDefaultCFAutoCompaction(true)
.setMaxNumberOfOpenFiles(maxOpenFiles)
.setEnableCompactionDag(false)
Expand Down Expand Up @@ -519,6 +528,11 @@ public DBStore getStore() {
return store;
}

@Override
public Path getSnapshotParentDir() {
return Paths.get(store.getSnapshotsParentDir());
}

/**
* Given a volume return the corresponding DB key.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.hadoop.ozone.om;

import static org.apache.commons.io.file.PathUtils.deleteDirectory;
import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.apache.hadoop.hdds.StringUtils.getLexicographicallyHigherString;
import static org.apache.hadoop.hdds.utils.db.DBStoreBuilder.DEFAULT_COLUMN_FAMILY_NAME;
Expand Down Expand Up @@ -97,6 +98,7 @@
import org.apache.hadoop.ozone.om.exceptions.OMException;
import org.apache.hadoop.ozone.om.helpers.SnapshotDiffJob;
import org.apache.hadoop.ozone.om.helpers.SnapshotInfo;
import org.apache.hadoop.ozone.om.lock.OMLockDetails;
import org.apache.hadoop.ozone.om.service.SnapshotDiffCleanupService;
import org.apache.hadoop.ozone.om.snapshot.OmSnapshotLocalDataManager;
import org.apache.hadoop.ozone.om.snapshot.SnapshotCache;
Expand Down Expand Up @@ -512,6 +514,64 @@ public void invalidateCacheEntry(UUID key) {
}
}

/**
* Deletes the snapshot checkpoint directories for a given snapshot ID up to
* the specified maximum version. This method ensures that all directories
* containing checkpoint data for the specified snapshot ID up to the max
* version are removed in a controlled manner.
*
* @param snapshotId The unique identifier of the snapshot whose checkpoint
* directories are to be deleted.
* @param maxVersion The maximum version of checkpoint directories to delete.
* If a value less than 0 is provided, it defaults to the
* current maximum version of the snapshot.
* @throws IOException If there is a failure acquiring the snapshot database
* lock or while deleting directories.
* @throws IllegalArgumentException If the specified maxVersion is greater
* than the current maximum version of the
* snapshot.
*/
public void deleteSnapshotCheckpointDirectories(UUID snapshotId, int maxVersion) throws IOException {
// Acquire Snapshot DBHandle lock before removing the older version to ensure all readers are done with the
// snapshot db use.
try (UncheckedAutoCloseableSupplier<OMLockDetails> lock = getSnapshotCache().lock(snapshotId)) {
if (!lock.get().isLockAcquired()) {
throw new IOException("Failed to acquire dbHandlelock on snapshot: " + snapshotId);
}
try (OmSnapshotLocalDataManager.ReadableOmSnapshotLocalDataMetaProvider snapMetaProvider =
snapshotLocalDataManager.getOmSnapshotLocalDataMeta(snapshotId)) {
if (maxVersion < 0) {
maxVersion = snapMetaProvider.getMeta().getVersion();
}
if (maxVersion > snapMetaProvider.getMeta().getVersion()) {
throw new IllegalArgumentException(
String.format("Max Version to be deleted can never be greater than the existing " +
"version of the snapshot. Argument passed : %d and snapshotMaxVersion : %d", maxVersion,
snapMetaProvider.getMeta().getVersion()));
}
// Binary search the smallest existing version and delete the older versions starting from the smallest version.
// This is to ensure efficient crash recovery.
int smallestExistingVersion = 0;
int largestExistingVersion = maxVersion;
while (smallestExistingVersion <= largestExistingVersion) {
int midVersion = smallestExistingVersion + (largestExistingVersion - smallestExistingVersion) / 2;
Path path = OmSnapshotManager.getSnapshotPath(ozoneManager.getMetadataManager(), snapshotId, midVersion);
if (path.toFile().exists()) {
largestExistingVersion = midVersion - 1;
} else {
smallestExistingVersion = midVersion + 1;
}
}
// Delete the older version directories. Always starting deletes from smallest version to largest version to
// ensure binary search works correctly on a later basis.
for (int version = smallestExistingVersion; version <= maxVersion; version++) {
Path path = OmSnapshotManager.getSnapshotPath(ozoneManager.getMetadataManager(), snapshotId, version);
deleteDirectory(path);
}
}
}
}

/**
* Creates snapshot checkpoint that corresponds to snapshotInfo.
* @param omMetadataManager the metadata manager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,18 @@
package org.apache.hadoop.ozone.om.response.snapshot;

import static org.apache.hadoop.ozone.om.codec.OMDBDefinition.SNAPSHOT_INFO_TABLE;
import static org.apache.hadoop.ozone.om.lock.FlatResource.SNAPSHOT_DB_LOCK;

import com.google.common.annotations.VisibleForTesting;
import jakarta.annotation.Nonnull;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
import org.apache.commons.io.FileUtils;
import org.apache.hadoop.hdds.utils.TransactionInfo;
import org.apache.hadoop.hdds.utils.db.BatchOperation;
import org.apache.hadoop.ozone.om.OMMetadataManager;
import org.apache.hadoop.ozone.om.OmMetadataManagerImpl;
import org.apache.hadoop.ozone.om.OmSnapshotManager;
import org.apache.hadoop.ozone.om.helpers.SnapshotInfo;
import org.apache.hadoop.ozone.om.lock.OMLockDetails;
import org.apache.hadoop.ozone.om.response.CleanupTableInfo;
import org.apache.hadoop.ozone.om.response.OMClientResponse;
import org.apache.hadoop.ozone.om.snapshot.OmSnapshotLocalDataManager;
Expand Down Expand Up @@ -95,10 +91,9 @@ protected void addToDBBatch(OMMetadataManager omMetadataManager,
if (snapshotInfo == null) {
continue;
}

OmSnapshotManager omSnapshotManager = metadataManager.getOzoneManager().getOmSnapshotManager();
// Remove and close snapshot's RocksDB instance from SnapshotCache.
((OmMetadataManagerImpl) omMetadataManager).getOzoneManager().getOmSnapshotManager()
.invalidateCacheEntry(snapshotInfo.getSnapshotId());
omSnapshotManager.invalidateCacheEntry(snapshotInfo.getSnapshotId());
// Remove the snapshot from snapshotId to snapshotTableKey map.
((OmMetadataManagerImpl) omMetadataManager).getSnapshotChainManager()
.removeFromSnapshotIdToTable(snapshotInfo.getSnapshotId());
Expand All @@ -109,7 +104,8 @@ protected void addToDBBatch(OMMetadataManager omMetadataManager,
// snapshot purged txn is flushed to rocksdb.
updateLocalData(snapshotLocalDataManager, snapshotInfo);
// Delete Snapshot checkpoint directory.
deleteCheckpointDirectory(snapshotLocalDataManager, omMetadataManager, snapshotInfo);

omSnapshotManager.deleteSnapshotCheckpointDirectories(snapshotInfo.getSnapshotId(), -1);
// Delete snapshotInfo from the table.
omMetadataManager.getSnapshotInfoTable().deleteWithBatch(batchOperation, dbKey);
}
Expand All @@ -133,34 +129,6 @@ private void updateLocalData(OmSnapshotLocalDataManager localDataManager, Snapsh
}
}

/**
* Deletes the checkpoint directory for a snapshot.
*/
private void deleteCheckpointDirectory(OmSnapshotLocalDataManager snapshotLocalDataManager,
OMMetadataManager omMetadataManager, SnapshotInfo snapshotInfo) throws IOException {
// Acquiring write lock to avoid race condition with sst filtering service which creates a sst filtered file
// inside the snapshot directory. Any operation apart which doesn't create/delete files under this snapshot
// directory can run in parallel along with this operation.
OMLockDetails omLockDetails = omMetadataManager.getLock()
.acquireWriteLock(SNAPSHOT_DB_LOCK, snapshotInfo.getSnapshotId().toString());
boolean acquiredSnapshotLock = omLockDetails.isLockAcquired();
if (acquiredSnapshotLock) {
try (OmSnapshotLocalDataManager.ReadableOmSnapshotLocalDataMetaProvider snapMetaProvider =
snapshotLocalDataManager.getOmSnapshotLocalDataMeta(snapshotInfo)) {
Path snapshotDirPath = OmSnapshotManager.getSnapshotPath(omMetadataManager, snapshotInfo,
snapMetaProvider.getMeta().getVersion());
try {
FileUtils.deleteDirectory(snapshotDirPath.toFile());
} catch (IOException ex) {
LOG.error("Failed to delete snapshot directory {} for snapshot {}",
snapshotDirPath, snapshotInfo.getTableKey(), ex);
} finally {
omMetadataManager.getLock().releaseWriteLock(SNAPSHOT_DB_LOCK, snapshotInfo.getSnapshotId().toString());
}
}
}
}

@VisibleForTesting
public Map<String, SnapshotInfo> getUpdatedSnapInfos() {
return updatedSnapInfos;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,10 @@ public void release(UUID key) {
*/
public UncheckedAutoCloseableSupplier<OMLockDetails> lock() {
return lock(() -> lock.acquireResourceWriteLock(SNAPSHOT_DB_LOCK),
() -> lock.releaseResourceWriteLock(SNAPSHOT_DB_LOCK), () -> cleanup(true));
() -> lock.releaseResourceWriteLock(SNAPSHOT_DB_LOCK), () -> {
cleanup(true);
return dbMap.isEmpty();
});
}

/**
Expand All @@ -303,22 +306,24 @@ public UncheckedAutoCloseableSupplier<OMLockDetails> lock() {
public UncheckedAutoCloseableSupplier<OMLockDetails> lock(UUID snapshotId) {
return lock(() -> lock.acquireWriteLock(SNAPSHOT_DB_LOCK, snapshotId.toString()),
() -> lock.releaseWriteLock(SNAPSHOT_DB_LOCK, snapshotId.toString()),
() -> cleanup(snapshotId));
() -> {
cleanup(snapshotId, false);
return !dbMap.containsKey(snapshotId);
});
}

private OMLockDetails getEmptyOmLockDetails(OMLockDetails lockDetails) {
return lockDetails.isLockAcquired() ? EMPTY_DETAILS_LOCK_ACQUIRED : EMPTY_DETAILS_LOCK_NOT_ACQUIRED;
}

private UncheckedAutoCloseableSupplier<OMLockDetails> lock(Supplier<OMLockDetails> lockFunction,
Supplier<OMLockDetails> unlockFunction, Supplier<Void> cleanupFunction) {
Supplier<OMLockDetails> unlockFunction, Supplier<Boolean> cleanupFunction) {
Supplier<OMLockDetails> emptyLockFunction = () -> getEmptyOmLockDetails(lockFunction.get());
Supplier<OMLockDetails> emptyUnlockFunction = () -> getEmptyOmLockDetails(unlockFunction.get());

AtomicReference<OMLockDetails> lockDetails = new AtomicReference<>(emptyLockFunction.get());
if (lockDetails.get().isLockAcquired()) {
cleanupFunction.get();
if (!dbMap.isEmpty()) {
if (!cleanupFunction.get()) {
lockDetails.set(emptyUnlockFunction.get());
}
}
Expand Down Expand Up @@ -349,14 +354,19 @@ public OMLockDetails get() {
private synchronized Void cleanup(boolean force) {
if (force || dbMap.size() > cacheSizeLimit) {
for (UUID evictionKey : pendingEvictionQueue) {
cleanup(evictionKey);
cleanup(evictionKey, true);
}
}
return null;
}

private synchronized Void cleanup(UUID evictionKey) {
private synchronized Void cleanup(UUID evictionKey, boolean expectKeyToBePresent) {
ReferenceCounted<OmSnapshot> snapshot = dbMap.get(evictionKey);

if (!expectKeyToBePresent && snapshot == null) {
return null;
}

if (snapshot != null && snapshot.getTotalRefCount() == 0) {
try {
compactSnapshotDB(snapshot.get());
Expand Down
Loading