You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "smiklosovic (via GitHub)" <gi...@apache.org> on 2023/01/25 10:02:15 UTC

[GitHub] [cassandra] smiklosovic opened a new pull request, #2113: Cassandra 18153 reproducer

smiklosovic opened a new pull request, #2113:
URL: https://github.com/apache/cassandra/pull/2113

   Thanks for sending a pull request! Here are some tips if you're new here:
    
    * Ensure you have added or run the [appropriate tests](https://cassandra.apache.org/_/development/testing.html) for your PR.
    * Be sure to keep the PR description updated to reflect all changes.
    * Write your PR title to summarize what this PR proposes.
    * If possible, provide a concise example to reproduce the issue for a faster review.
    * Read our [contributor guidelines](https://cassandra.apache.org/_/development/index.html)
    * If you're making a documentation change, see our [guide to documentation contribution](https://cassandra.apache.org/_/development/documentation.html)
    
   Commit messages should follow the following format:
   
   ```
   <One sentence description, usually Jira title or CHANGES.txt summary>
   
   <Optional lengthier description (context on patch)>
   
   patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####
   
   Co-authored-by: Name1 <email1>
   Co-authored-by: Name2 <email2>
   
   ```
   
   The [Cassandra Jira](https://issues.apache.org/jira/projects/CASSANDRA/issues/)
   
   


-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] Cassandra 18153 reproducer [cassandra]

Posted by "pmcfadin (via GitHub)" <gi...@apache.org>.
pmcfadin commented on PR #2113:
URL: https://github.com/apache/cassandra/pull/2113#issuecomment-4227558341

   Closing as [CASSANDRA-18153](https://issues.apache.org/jira/browse/CASSANDRA-18153) has been resolved. If this PR contains changes not captured in the merged fix, please reopen with a rebase against the current branch.


-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] jacek-lewandowski commented on a diff in pull request #2113: Cassandra 18153 reproducer

Posted by "jacek-lewandowski (via GitHub)" <gi...@apache.org>.
jacek-lewandowski commented on code in PR #2113:
URL: https://github.com/apache/cassandra/pull/2113#discussion_r1091530266


##########
src/java/org/apache/cassandra/db/SystemKeyspace.java:
##########
@@ -1242,7 +1250,7 @@ public static UUID getSchemaVersion()
         String req = "SELECT schema_version FROM system.%s WHERE key='%s'";
         UntypedResultSet result = executeInternal(format(req, LOCAL, LOCAL));
 
-        if (!result.isEmpty() && result.one().has("schema_version"))
+        if (result != null && result.isEmpty() && result.one().has("schema_version"))

Review Comment:
   `... && !result.isEmpty()` ?



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic commented on a diff in pull request #2113: Cassandra 18153 reproducer

Posted by "smiklosovic (via GitHub)" <gi...@apache.org>.
smiklosovic commented on code in PR #2113:
URL: https://github.com/apache/cassandra/pull/2113#discussion_r1091712518


##########
src/java/org/apache/cassandra/db/SystemKeyspace.java:
##########
@@ -1242,7 +1250,7 @@ public static UUID getSchemaVersion()
         String req = "SELECT schema_version FROM system.%s WHERE key='%s'";
         UntypedResultSet result = executeInternal(format(req, LOCAL, LOCAL));
 
-        if (!result.isEmpty() && result.one().has("schema_version"))
+        if (result != null && result.isEmpty() && result.one().has("schema_version"))

Review Comment:
   I will revert this change. I was thinking it will be an easy fix but it seems like the whole class is filled with issues like this. We may dedicate separate ticket for that to clean it up properly.



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic commented on a diff in pull request #2113: Cassandra 18153 reproducer

Posted by "smiklosovic (via GitHub)" <gi...@apache.org>.
smiklosovic commented on code in PR #2113:
URL: https://github.com/apache/cassandra/pull/2113#discussion_r1092102906


##########
src/java/org/apache/cassandra/db/view/ViewBuilder.java:
##########
@@ -66,7 +66,7 @@
     private final ColumnFamilyStore baseCfs;
     private final View view;
     private final String ksName;
-    private final UUID localHostId = SystemKeyspace.getOrInitializeLocalHostId();
+    private final UUID localHostId = SystemKeyspace.getLocalHostId();

Review Comment:
   I do not think that this class should be responsible for initialization of host id, it should just read it. I do not even think there might be such a case when initialization here would be necessary.



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra] smiklosovic commented on a diff in pull request #2113: Cassandra 18153 reproducer

Posted by "smiklosovic (via GitHub)" <gi...@apache.org>.
smiklosovic commented on code in PR #2113:
URL: https://github.com/apache/cassandra/pull/2113#discussion_r1091701505


##########
src/java/org/apache/cassandra/db/SystemKeyspace.java:
##########
@@ -1242,7 +1250,7 @@ public static UUID getSchemaVersion()
         String req = "SELECT schema_version FROM system.%s WHERE key='%s'";
         UntypedResultSet result = executeInternal(format(req, LOCAL, LOCAL));
 
-        if (!result.isEmpty() && result.one().has("schema_version"))
+        if (result != null && result.isEmpty() && result.one().has("schema_version"))

Review Comment:
   thanks! good catch.



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] Cassandra 18153 reproducer [cassandra]

Posted by "pmcfadin (via GitHub)" <gi...@apache.org>.
pmcfadin closed pull request #2113: Cassandra 18153 reproducer
URL: https://github.com/apache/cassandra/pull/2113


-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org