-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BugFix] Fix snapshot was deleted by mistake after restore from it (#…
…56098) Signed-off-by: srlch <linzichao@starrocks.com> (cherry picked from commit 2eb60cf) # Conflicts: # fe/fe-core/src/main/java/com/starrocks/lake/snapshot/RestoreClusterSnapshotMgr.java # fe/fe-core/src/test/java/com/starrocks/lake/snapshot/RestoreClusterSnapshotMgrTest.java
- Loading branch information
1 parent
4687af4
commit 31c09e0
Showing
8 changed files
with
197 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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 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 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 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
40 changes: 40 additions & 0 deletions
40
fe/fe-core/src/main/java/com/starrocks/lake/snapshot/RestoredSnapshotInfo.java
This file contains 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright 2021-present StarRocks, Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package com.starrocks.lake.snapshot; | ||
|
||
// save the infomation parsed from the cluster snapshot when start in restore mode | ||
public class RestoredSnapshotInfo { | ||
private String snapshotName; | ||
private long feJournalId; | ||
private long starMgrJournalId; | ||
|
||
public RestoredSnapshotInfo(String snapshotName, long feJournalId, long starMgrJournalId) { | ||
this.snapshotName = snapshotName; | ||
this.feJournalId = feJournalId; | ||
this.starMgrJournalId = starMgrJournalId; | ||
} | ||
|
||
public String getSnapshotName() { | ||
return snapshotName; | ||
} | ||
|
||
public long getFeJournalId() { | ||
return feJournalId; | ||
} | ||
|
||
public long getStarMgrJournalId() { | ||
return starMgrJournalId; | ||
} | ||
} |
This file contains 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 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
Oops, something went wrong.