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/02/10 11:39:53 UTC

[GitHub] [cassandra] smiklosovic opened a new pull request, #2149: Cassandra 18211 4.1

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

   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


[GitHub] [cassandra] smiklosovic closed pull request #2149: Cassandra 18211 4.1

Posted by "smiklosovic (via GitHub)" <gi...@apache.org>.
smiklosovic closed pull request #2149: Cassandra 18211 4.1
URL: https://github.com/apache/cassandra/pull/2149


-- 
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 #2149: Cassandra 18211 4.1

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


##########
test/unit/org/apache/cassandra/service/snapshot/SnapshotManagerTest.java:
##########
@@ -43,27 +51,38 @@
     @BeforeClass
     public static void beforeClass()
     {
+        ByteBuddyAgent.install();
         DatabaseDescriptor.daemonInitialization();
         FileUtils.setFSErrorHandler(new DefaultFSErrorHandler());
     }
 
     @ClassRule
     public static TemporaryFolder temporaryFolder = new TemporaryFolder();
 
-    private TableSnapshot generateSnapshotDetails(String tag, Instant expiration) throws Exception {
-        return new TableSnapshot(
-        "ks",
-        "tbl",
-        UUID.randomUUID(),
-        tag,
-        Instant.EPOCH,
-        expiration,
-        createFolders(temporaryFolder)
-        );
+    private TableSnapshot generateSnapshotDetails(String tag, Instant expiration)
+    {
+        try
+        {
+            return new TableSnapshot(
+            "ks",

Review Comment:
   nit:formatting



-- 
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 #2149: Cassandra 18211 4.1

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


##########
test/distributed/org/apache/cassandra/distributed/test/SnapshotsTest.java:
##########
@@ -341,10 +340,8 @@ private void waitForSnapshotCleared(String snapshotName)
 
     private void waitForSnapshot(String snapshotName, boolean expectPresent, boolean noTTL)
     {
-        if (waitForSnapshotInternal(snapshotName, expectPresent, noTTL))

Review Comment:
   nit:`waitForSnapshotInternal` can be now removed?



-- 
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 #2149: Cassandra 18211 4.1

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


##########
src/java/org/apache/cassandra/service/snapshot/SnapshotManager.java:
##########
@@ -106,22 +109,21 @@ public synchronized void addSnapshot(TableSnapshot snapshot)
         }
     }
 
-    @VisibleForTesting
-    protected synchronized void loadSnapshots()
+    public Set<TableSnapshot> loadSnapshots()

Review Comment:
   why is it not synchronized anymore?



-- 
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 #2149: Cassandra 18211 4.1

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


##########
src/java/org/apache/cassandra/service/snapshot/SnapshotLoader.java:
##########
@@ -74,15 +74,15 @@ public SnapshotLoader(Collection<Path> dataDirs)
         this.dataDirectories = dataDirs;
     }
 
-    public Set<TableSnapshot> loadSnapshots()
+    public synchronized Set<TableSnapshot> loadSnapshots()

Review Comment:
   what is it synchronized with?



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