sashapolo commented on code in PR #1023:
URL: https://github.com/apache/ignite-3/pull/1023#discussion_r950146465


##########
modules/runner/src/main/java/org/apache/ignite/internal/configuration/storage/DistributedConfigurationStorage.java:
##########
@@ -185,38 +190,52 @@ public CompletableFuture<Serializable> readLatest(String 
key) {
 
     /** {@inheritDoc} */
     @Override
-    public CompletableFuture<Data> readAll() throws StorageException {
+    public CompletableFuture<Data> readAllOnStart() throws StorageException {
         return registerFuture(vaultMgr.get(MetaStorageManager.APPLIED_REV)
-                .thenApplyAsync(appliedRevEntry -> {
-                    long appliedRevision = appliedRevEntry == null ? 0L : 
ByteUtils.bytesToLong(appliedRevEntry.value());
+                .thenComposeAsync(appliedRevEntry -> {

Review Comment:
   Or we can take this even further and split `readAll` into two methods: one 
to resolve the required revision and another to read the data



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to