ekaterinadimitrova2 commented on code in PR #2713:
URL: https://github.com/apache/cassandra/pull/2713#discussion_r1351192250


##########
src/java/org/apache/cassandra/schema/Schema.java:
##########
@@ -496,27 +509,23 @@ public Optional<Function> findFunction(FunctionName name, 
List<AbstractType<?>>
     /* Version control */
 
     /**
-     * @return current schema version
+     * Returns the current schema version. Although, if the schema is being 
updated while the method was called, it
+     * can return a stale version which does not correspond to the current 
keyspaces metadata. It is because the schema
+     * version is unknown for the partially applied changes and is updated 
after the entire schema change is applied.
+     * @see #getVersion()
      */
-    public UUID getVersion()
+    public UUID getVersionUnsafe()
     {
         return version;
     }
 
     /**
-     * Checks whether the given schema version is the same as the current 
local schema.
+     * Returns the curren schema version. If the schema is in the middle of 
the update, the method will wait until
+     * the update is completed and return the new version.
      */
-    public boolean isSameVersion(UUID schemaVersion)
+    public synchronized UUID getVersion()
     {
-        return schemaVersion != null && schemaVersion.equals(version);
-    }
-
-    /**
-     * Checks whether the current schema is empty.
-     */
-    public boolean isEmpty()

Review Comment:
   I do not recommend removing public methods on patch release



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to