rpuch commented on code in PR #4524:
URL: https://github.com/apache/ignite-3/pull/4524#discussion_r1792934501


##########
modules/metastorage-api/src/main/java/org/apache/ignite/internal/metastorage/exceptions/CompactedException.java:
##########
@@ -36,10 +36,17 @@ public CompactedException() {
     /**
      * Constructs an exception with a given message.
      *
-     * @param revision Requested revision.
+     * @param requestedRevision Requested revision.
+     * @param latestCompatedRevision Latest compacted revision.
      */
-    public CompactedException(long revision) {
-        super(COMPACTED_ERR, "Requested revision has already been compacted: " 
+ revision);
+    public CompactedException(long requestedRevision, long 
latestCompatedRevision) {

Review Comment:
   ```suggestion
       public CompactedException(long requestedRevision, long 
latestCompactedRevision) {
   ```



##########
modules/metastorage/src/testFixtures/java/org/apache/ignite/internal/metastorage/server/SimpleInMemoryKeyValueStorage.java:
##########
@@ -740,22 +741,26 @@ private Collection<Entry> doGetAll(List<byte[]> keys, 
long rev) {
     }
 
     private Entry doGet(byte[] key, long revUpperBound) {
-        assert revUpperBound >= 0 : "Invalid arguments: [revUpperBound=" + 
revUpperBound + ']';

Review Comment:
   Let's revert this change (information about `revUpperBound` seems to be 
useful)



##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/server/persistence/RocksDbKeyValueStorage.java:
##########
@@ -1076,35 +1078,27 @@ private Collection<Entry> doGetAll(Collection<byte[]> 
keys, long rev) {
         return res;
     }
 
-    /**
-     * Gets the value by key and revision.
-     *
-     * @param key            Target key.
-     * @param revUpperBound  Target upper bound of revision.
-     * @return Value.
-     */
     private Entry doGet(byte[] key, long revUpperBound) {
-        assert revUpperBound >= 0 : "Invalid arguments: [revUpperBound=" + 
revUpperBound + ']';

Review Comment:
   The actual value of `revUpperBound` could be helpful. How about reverting 
this change?



-- 
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-unsubscr...@ignite.apache.org

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

Reply via email to