HDDS-7578. Wrong directory config used for SCM HA Ratis Snapshot#4030
HDDS-7578. Wrong directory config used for SCM HA Ratis Snapshot#4030adoroszlai merged 1 commit intoapache:masterfrom
Conversation
|
@xBis7 @sumitagrawl can you please take a look ? |
sumitagrawl
left a comment
There was a problem hiding this comment.
@symious Thanks working on this, there is a minor question, please check
| public static String getSCMRatisSnapshotDirectory(ConfigurationSource conf) { | ||
| String snapshotDir = | ||
| conf.get(ScmConfigKeys.OZONE_SCM_HA_RATIS_STORAGE_DIR); | ||
| conf.get(ScmConfigKeys.OZONE_SCM_HA_RATIS_SNAPSHOT_DIR); |
There was a problem hiding this comment.
Do this have any impact over upgrade? since snapshot directory path changed for user configured case.
There was a problem hiding this comment.
@sumitagrawl Thank you for the review.
I think this is a typo issue. A different place to store snapshot shouldn't cause difference.
There was a problem hiding this comment.
I mean,
Before upgrade, snapshot is stored at OZONE_SCM_HA_RATIS_STORAGE_DIR and snapshots are created in this path.
After upgrade, its changed to OZONE_SCM_HA_RATIS_SNAPSHOT_DIR.
In this case on startup, if ozone try to recover snapshots, will this cause any failure or impact to the system ?
There was a problem hiding this comment.
I think this snapshot directory acts like a tmp directory. Every file downloaded from leader SCM to this directory, will be used to replace current SCM's rocksdb. So basically change it from OZONE_SCM_HA_RATIS_STORAGE_DIR to OZONE_SCM_HA_RATIS_SNAPSHOT_DIR will not cause any compatibility issue, since the files left in this snapshot directory are not useful anymore after a service upgrade restart.
Hi @nandakumar131, please correct me if I'm wrong.
|
Thanks @symious for the fix, @ChenSammi, @ferhui, @sumitagrawl, @xBis7 for the review. |
What changes were proposed in this pull request?
The configuration of "OZONE_SCM_HA_RATIS_SNAPSHOT_DIR" is not correctly used as the directory of ratis snapshot.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-7578
How was this patch tested?
unit test.