Maxwell-Guo commented on code in PR #2795:
URL: https://github.com/apache/cassandra/pull/2795#discussion_r1356018222


##########
src/java/org/apache/cassandra/cql3/statements/DescribeStatement.java:
##########
@@ -132,8 +132,13 @@ public final ResultMessage execute(QueryState state, 
QueryOptions options, long
     @Override
     public ResultMessage executeLocally(QueryState state, QueryOptions options)
     {
-        Keyspaces keyspaces = Schema.instance.distributedAndLocalKeyspaces();
-        UUID schemaVersion = Schema.instance.getVersion();
+        UUID schemaVersion;
+        Keyspaces keyspaces;
+        do
+        {
+            schemaVersion = Schema.instance.getVersionSync();
+            keyspaces = Schema.instance.distributedAndLocalKeyspaces();

Review Comment:
   long time ago, in our cluster, with poor machine configuration, we some time 
saw that the cluster schema may be inconsistent, and it take a long time for 
them to reach a consistent state. Some times it due to the poor disk hung, 
where the system table just locate. Some time is other reasons.
   
   So what about logging here when the loop  is more than some times like 3 ?



##########
src/java/org/apache/cassandra/cql3/statements/DescribeStatement.java:
##########
@@ -132,8 +132,13 @@ public final ResultMessage execute(QueryState state, 
QueryOptions options, long
     @Override
     public ResultMessage executeLocally(QueryState state, QueryOptions options)
     {
-        Keyspaces keyspaces = Schema.instance.distributedAndLocalKeyspaces();
-        UUID schemaVersion = Schema.instance.getVersion();
+        UUID schemaVersion;
+        Keyspaces keyspaces;
+        do
+        {
+            schemaVersion = Schema.instance.getVersionSync();
+            keyspaces = Schema.instance.distributedAndLocalKeyspaces();

Review Comment:
   long time ago, in our cluster, with poor machine configuration, we some time 
saw that the cluster schema may be inconsistent, and it take a long time for 
them to reach a consistent state. Some times it due to the poor disk hung, 
where the system table just locate. Some time is other reasons.
   
   So what about logging here when the loop  is more than some times like 3 ?



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