alievmirza commented on a change in pull request #160:
URL: https://github.com/apache/ignite-3/pull/160#discussion_r648932850



##########
File path: 
modules/runner/src/main/java/org/apache/ignite/internal/storage/DistributedConfigurationStorage.java
##########
@@ -80,45 +83,45 @@
     /**
      * Constructor.
      *
-     * @param metaStorageMgr MetaStorage Manager.
+     * @param metaStorageMgr Meta storage manager.
+     * @param vaultMgr Vault manager.
      */
-    public DistributedConfigurationStorage(MetaStorageManager metaStorageMgr) {
+    public DistributedConfigurationStorage(MetaStorageManager metaStorageMgr, 
VaultManager vaultMgr) {
         this.metaStorageMgr = metaStorageMgr;
+
+        this.vaultMgr = vaultMgr;
     }
 
     /** {@inheritDoc} */
     @Override public synchronized Data readAll() throws StorageException {
         HashMap<String, Serializable> data = new HashMap<>();
 
-        Iterator<Entry> entries = allDistributedConfigKeys().iterator();
+        Iterator<org.apache.ignite.internal.vault.common.Entry> entries = 
storedDistributedConfigKeys();
 
-        long maxRevision = 0L;
+        long appliedRevision = 0L;
 
         if (!entries.hasNext())
             return new Data(data, ver.get());
 
-        Entry entryForMasterKey = entries.next();
-
-        // First key must be the masterKey because it's supposed to be the 
first in lexicographical order
-        assert entryForMasterKey.key().equals(MASTER_KEY);
-
         while (entries.hasNext()) {
-            Entry entry = entries.next();
+            var entry = entries.next();
 
-            
data.put(entry.key().toString().substring((DISTRIBUTED_PREFIX).length()), 
(Serializable)ByteUtils.fromBytes(entry.value()));
+            if (entry.key().equals(MetaStorageManager.APPLIED_REV)) {
+                appliedRevision = 
ByteUtils.bytesToLong(Objects.requireNonNull(entry.value()), 0);

Review comment:
       done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to