You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/09/30 08:31:25 UTC

[GitHub] [ignite-3] ibessonov opened a new pull request #367: IGNITE-15646 ConcurrentHashMapStorage moved to test package.

ibessonov opened a new pull request #367:
URL: https://github.com/apache/ignite-3/pull/367


   https://issues.apache.org/jira/browse/IGNITE-15646


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-3] sashapolo commented on a change in pull request #367: IGNITE-15646 ConcurrentHashMapStorage moved to test package.

Posted by GitBox <gi...@apache.org>.
sashapolo commented on a change in pull request #367:
URL: https://github.com/apache/ignite-3/pull/367#discussion_r719422725



##########
File path: modules/table/src/integrationTest/java/org/apache/ignite/distributed/ITTablePersistenceTest.java
##########
@@ -125,14 +130,19 @@
 
     /** {@inheritDoc} */
     @Override public Path getListenerPersistencePath(PartitionListener listener) {
-        return ((RocksDbStorage) listener.getStorage()).getDbPath();
+        return paths.get(listener);
     }
 
     /** {@inheritDoc} */
     @Override public RaftGroupListener createListener(Path workDir) {
-        return new PartitionListener(
-            new RocksDbStorage(workDir.resolve(UUID.randomUUID().toString()), ByteBuffer::compareTo)
-        );
+        if (paths.containsValue(workDir))

Review comment:
       Looks like you search for the value twice, can we unify this check with the line below?




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-3] ibessonov commented on a change in pull request #367: IGNITE-15646 ConcurrentHashMapStorage moved to test package.

Posted by GitBox <gi...@apache.org>.
ibessonov commented on a change in pull request #367:
URL: https://github.com/apache/ignite-3/pull/367#discussion_r719300005



##########
File path: modules/table/src/integrationTest/java/org/apache/ignite/distributed/ITTablePersistenceTest.java
##########
@@ -125,14 +130,18 @@
 
     /** {@inheritDoc} */
     @Override public Path getListenerPersistencePath(PartitionListener listener) {
-        return ((RocksDbStorage) listener.getStorage()).getDbPath();
+        return paths.get(listener);
     }
 
     /** {@inheritDoc} */
     @Override public RaftGroupListener createListener(Path workDir) {
-        return new PartitionListener(
-            new RocksDbStorage(workDir.resolve(UUID.randomUUID().toString()), ByteBuffer::compareTo)
-        );
+        Path tableDir = workDir.resolve(UUID.randomUUID().toString());

Review comment:
       I think I can move it to the parent class. Should I move a set of paths as well?




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-3] sashapolo commented on a change in pull request #367: IGNITE-15646 ConcurrentHashMapStorage moved to test package.

Posted by GitBox <gi...@apache.org>.
sashapolo commented on a change in pull request #367:
URL: https://github.com/apache/ignite-3/pull/367#discussion_r719274150



##########
File path: modules/table/src/integrationTest/java/org/apache/ignite/distributed/ITTablePersistenceTest.java
##########
@@ -125,14 +130,18 @@
 
     /** {@inheritDoc} */
     @Override public Path getListenerPersistencePath(PartitionListener listener) {
-        return ((RocksDbStorage) listener.getStorage()).getDbPath();
+        return paths.get(listener);
     }
 
     /** {@inheritDoc} */
     @Override public RaftGroupListener createListener(Path workDir) {
-        return new PartitionListener(
-            new RocksDbStorage(workDir.resolve(UUID.randomUUID().toString()), ByteBuffer::compareTo)
-        );
+        Path tableDir = workDir.resolve(UUID.randomUUID().toString());

Review comment:
       Can we update the parent class, so that we can get rid of this fake directory?

##########
File path: modules/table/src/integrationTest/java/org/apache/ignite/distributed/ITTablePersistenceTest.java
##########
@@ -41,7 +43,7 @@
 import org.apache.ignite.raft.client.service.RaftGroupService;
 
 /**
- * Persistent (rocksdb-based) partitions raft group snapshots tests.
+ * Persistent partitions raft group snapshots tests.

Review comment:
       If this test tests some persistent properties, why do we switch to an in-memory implementation?




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-3] sashapolo commented on a change in pull request #367: IGNITE-15646 ConcurrentHashMapStorage moved to test package.

Posted by GitBox <gi...@apache.org>.
sashapolo commented on a change in pull request #367:
URL: https://github.com/apache/ignite-3/pull/367#discussion_r719437836



##########
File path: modules/table/src/integrationTest/java/org/apache/ignite/distributed/ITTablePersistenceTest.java
##########
@@ -125,14 +130,19 @@
 
     /** {@inheritDoc} */
     @Override public Path getListenerPersistencePath(PartitionListener listener) {
-        return ((RocksDbStorage) listener.getStorage()).getDbPath();
+        return paths.get(listener);
     }
 
     /** {@inheritDoc} */
     @Override public RaftGroupListener createListener(Path workDir) {
-        return new PartitionListener(
-            new RocksDbStorage(workDir.resolve(UUID.randomUUID().toString()), ByteBuffer::compareTo)
-        );
+        if (paths.containsValue(workDir))

Review comment:
       For example:
   ```
   return paths.entrySet()
       .stream()
       .filter(entry -> entry.getValue().equals(workDir))
       .findAny()
       .map(Map.Entry::getKey)
       .orElseGet(() -> {
           PartitionListener listener = new PartitionListener(new ConcurrentHashMapStorage());
   
           paths.put(listener, workDir);
   
           return listener;
       });
   ```




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-3] ibessonov merged pull request #367: IGNITE-15646 ConcurrentHashMapStorage moved to test package.

Posted by GitBox <gi...@apache.org>.
ibessonov merged pull request #367:
URL: https://github.com/apache/ignite-3/pull/367


   


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-3] ibessonov commented on a change in pull request #367: IGNITE-15646 ConcurrentHashMapStorage moved to test package.

Posted by GitBox <gi...@apache.org>.
ibessonov commented on a change in pull request #367:
URL: https://github.com/apache/ignite-3/pull/367#discussion_r719311008



##########
File path: modules/table/src/integrationTest/java/org/apache/ignite/distributed/ITTablePersistenceTest.java
##########
@@ -41,7 +43,7 @@
 import org.apache.ignite.raft.client.service.RaftGroupService;
 
 /**
- * Persistent (rocksdb-based) partitions raft group snapshots tests.
+ * Persistent partitions raft group snapshots tests.

Review comment:
       I changed the test a little bit so that storage "survives node restart"




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite-3] ibessonov commented on a change in pull request #367: IGNITE-15646 ConcurrentHashMapStorage moved to test package.

Posted by GitBox <gi...@apache.org>.
ibessonov commented on a change in pull request #367:
URL: https://github.com/apache/ignite-3/pull/367#discussion_r719302359



##########
File path: modules/table/src/integrationTest/java/org/apache/ignite/distributed/ITTablePersistenceTest.java
##########
@@ -41,7 +43,7 @@
 import org.apache.ignite.raft.client.service.RaftGroupService;
 
 /**
- * Persistent (rocksdb-based) partitions raft group snapshots tests.
+ * Persistent partitions raft group snapshots tests.

Review comment:
       That's because of poor class name, I think. Nothing fails so I conclude that it didn't test any persistent properties




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org