You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2025/02/10 10:06:09 UTC
(shardingsphere) branch master updated: Private MetaDataVersionPersistService.switchActiveVersion (#34623)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 84d69a56255 Private MetaDataVersionPersistService.switchActiveVersion (#34623)
84d69a56255 is described below
commit 84d69a56255af56e309d64f2cac991d9c06b66a5
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Mon Feb 10 18:06:03 2025 +0800
Private MetaDataVersionPersistService.switchActiveVersion (#34623)
---
.../metadata/persist/version/MetaDataVersionPersistService.java | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/persist/version/MetaDataVersionPersistService.java b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/persist/version/MetaDataVersionPersistService.java
index 5d2fe79d645..290dc4831ec 100644
--- a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/persist/version/MetaDataVersionPersistService.java
+++ b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/persist/version/MetaDataVersionPersistService.java
@@ -51,13 +51,7 @@ public final class MetaDataVersionPersistService {
return nextVersion;
}
- /**
- * Switch active version.
- *
- * @param versionNodePathGenerator version node path generator
- * @param currentVersion current version
- */
- public void switchActiveVersion(final VersionNodePathGenerator versionNodePathGenerator, final int currentVersion) {
+ private void switchActiveVersion(final VersionNodePathGenerator versionNodePathGenerator, final int currentVersion) {
repository.persist(versionNodePathGenerator.getActiveVersionPath(), String.valueOf(currentVersion));
if (MetaDataVersion.INIT_VERSION != currentVersion) {
getVersions(versionNodePathGenerator.getVersionsPath()).stream().filter(version -> version < currentVersion)