-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-13628. LocalSnapshotMetadata create should track snapshot from checkpoint instead of active object store #8982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
4d7e2e9
HDDS-13612. Track Sst file ranges in sst file metadata
swamirishi 0492725
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi 9c0899f
HDDS-13628. LocalSnapshotMetadata create should track snapshot from c…
swamirishi ffcd6d4
HDDS-13612. Track Sst file ranges in sst file metadata
swamirishi f0039d2
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi 4d0fe54
Merge remote-tracking branch 'origin/HDDS-13612' into HEAD
swamirishi e07d450
HDDS-13612. Fix dependency
swamirishi 895d0a1
Merge remote-tracking branch 'origin/HDDS-13612' into HEAD
swamirishi 0bced59
HDDS-13612. Fix Test case
swamirishi 001dfc7
Merge remote-tracking branch 'origin/HDDS-13612' into HEAD
swamirishi fb660d0
HDDS-13628. Fix test case
swamirishi f643193
HDDS-13612. Add javadoc
swamirishi b2485c8
Merge remote-tracking branch 'origin/HDDS-13612' into HEAD
swamirishi 4b7c613
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi 6187e2e
Merge remote-tracking branch 'apache/master' into HEAD
swamirishi 2dab381
HDDS-13628. Fix tests
swamirishi 5862e63
HDDS-13628. Fix findbugs
swamirishi 1e4d458
HDDS-13628. Fix findbugs
swamirishi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -517,8 +517,13 @@ public static DBCheckpoint createOmSnapshotCheckpoint( | |||||
| } | ||||||
| OmSnapshotManager omSnapshotManager = | ||||||
| ((OmMetadataManagerImpl) omMetadataManager).getOzoneManager().getOmSnapshotManager(); | ||||||
| // Create the snapshot local property file. | ||||||
| OmSnapshotManager.createNewOmSnapshotLocalDataFile(omSnapshotManager, omMetadataManager, snapshotInfo, store); | ||||||
| OzoneConfiguration configuration = ((OmMetadataManagerImpl) omMetadataManager).getOzoneManager().getConfiguration(); | ||||||
| try (OmMetadataManagerImpl checkpointMetadataManager = | ||||||
| OmMetadataManagerImpl.createCheckpointMetadataManager(configuration, dbCheckpoint)) { | ||||||
| // Create the snapshot local property file. | ||||||
| OmSnapshotManager.createNewOmSnapshotLocalDataFile(omSnapshotManager, | ||||||
| (RDBStore) checkpointMetadataManager.getStore(), snapshotInfo); | ||||||
| } | ||||||
|
|
||||||
| // Clean up active DB's deletedTable right after checkpoint is taken, | ||||||
| // Snapshot create is processed as a single transaction and | ||||||
|
|
@@ -532,11 +537,11 @@ public static DBCheckpoint createOmSnapshotCheckpoint( | |||||
| deleteKeysFromSnapRenamedTableInSnapshotScope(omMetadataManager, | ||||||
| snapshotInfo.getVolumeName(), snapshotInfo.getBucketName(), batchOperation); | ||||||
|
|
||||||
| if (dbCheckpoint != null && snapshotDirExist) { | ||||||
| if (snapshotDirExist) { | ||||||
| LOG.info("Checkpoint: {} for snapshot {} already exists.", | ||||||
| dbCheckpoint.getCheckpointLocation(), snapshotInfo.getTableKey()); | ||||||
| return dbCheckpoint; | ||||||
| } else if (dbCheckpoint != null) { | ||||||
| } else { | ||||||
| LOG.info("Created checkpoint: {} for snapshot {}", | ||||||
| dbCheckpoint.getCheckpointLocation(), | ||||||
| snapshotInfo.getTableKey()); | ||||||
|
|
@@ -632,16 +637,15 @@ private static List<LiveFileMetaData> getSnapshotSSTFileList(RDBStore store) | |||||
|
|
||||||
| /** | ||||||
| * Creates and writes snapshot local properties to a YAML file with uncompacted SST file list. | ||||||
| * @param omMetadataManager the metadata manager | ||||||
| * @param snapshotInfo The metadata of snapshot to be created | ||||||
| * @param store The store used to get uncompacted SST file list from. | ||||||
| * @param snapshotManager snapshot manager instance. | ||||||
| * @param snapshotStore snapshot metadata manager. | ||||||
| * @param snapshotInfo snapshot info instance corresponding to snapshot. | ||||||
| */ | ||||||
| public static void createNewOmSnapshotLocalDataFile(OmSnapshotManager snapshotManager, | ||||||
| OMMetadataManager omMetadataManager, SnapshotInfo snapshotInfo, RDBStore store) | ||||||
| throws IOException { | ||||||
| Path snapshotLocalDataPath = Paths.get(getSnapshotLocalPropertyYamlPath(omMetadataManager, snapshotInfo)); | ||||||
| public static void createNewOmSnapshotLocalDataFile(OmSnapshotManager snapshotManager, RDBStore snapshotStore, | ||||||
| SnapshotInfo snapshotInfo) throws IOException { | ||||||
| Path snapshotLocalDataPath = Paths.get(getSnapshotLocalPropertyYamlPath(snapshotStore.getDbLocation().toPath())); | ||||||
|
||||||
| Path snapshotLocalDataPath = Paths.get(getSnapshotLocalPropertyYamlPath(snapshotStore.getDbLocation().toPath())); | |
| Path snapshotLocalDataPath = getSnapshotLocalPropertyYamlPath(snapshotStore.getDbLocation().toPath()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.