You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2021/06/22 17:27:06 UTC

[GitHub] [cassandra] maedhroz opened a new pull request #1080: Add isolated flush timer to CommitLogMetrics and ensure writes correspond to single WaitingOnCommit data points

maedhroz opened a new pull request #1080:
URL: https://github.com/apache/cassandra/pull/1080


   patch by Caleb Rackliffe for CASSANDRA-16701


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

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] maedhroz commented on a change in pull request #1080: Add isolated flush timer to CommitLogMetrics and ensure writes correspond to single WaitingOnCommit data points

Posted by GitBox <gi...@apache.org>.
maedhroz commented on a change in pull request #1080:
URL: https://github.com/apache/cassandra/pull/1080#discussion_r656552609



##########
File path: src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
##########
@@ -499,13 +503,12 @@ void waitForFinalSync()
         }
     }
 
-    void waitForSync(int position, Timer waitingOnCommit)
+    void waitForSync(int position)
     {
         while (lastSyncedOffset < position)
         {
-            WaitQueue.Signal signal = waitingOnCommit != null ?
-                                      syncComplete.register(waitingOnCommit.time()) :
-                                      syncComplete.register();

Review comment:
       `PeriodicCommitLogService` doesn't block writes under normal conditions, so I left that behavior alone. The big motivating factor for this change was making sure that when "batch" or "group" CL are in use, the metric data points correspond to single writes (and vise-versa). It probably wouldn't be harmful to do it for "periodic" as well, but it also doesn't buy much.




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

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] yifan-c commented on a change in pull request #1080: Add isolated flush timer to CommitLogMetrics and ensure writes correspond to single WaitingOnCommit data points

Posted by GitBox <gi...@apache.org>.
yifan-c commented on a change in pull request #1080:
URL: https://github.com/apache/cassandra/pull/1080#discussion_r656544519



##########
File path: src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
##########
@@ -499,13 +503,12 @@ void waitForFinalSync()
         }
     }
 
-    void waitForSync(int position, Timer waitingOnCommit)
+    void waitForSync(int position)
     {
         while (lastSyncedOffset < position)
         {
-            WaitQueue.Signal signal = waitingOnCommit != null ?
-                                      syncComplete.register(waitingOnCommit.time()) :
-                                      syncComplete.register();

Review comment:
       A general question... why does `AbstractCommitLogService#awaitSyncAt` (called by `PeriodicCommitLogService`) still register the timer context with the syncComplete?

##########
File path: src/java/org/apache/cassandra/metrics/CommitLogMetrics.java
##########
@@ -23,6 +23,8 @@
 import org.apache.cassandra.db.commitlog.AbstractCommitLogService;
 import org.apache.cassandra.db.commitlog.AbstractCommitLogSegmentManager;
 
+import java.util.concurrent.TimeUnit;

Review comment:
       unused import




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

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] maedhroz closed pull request #1080: Add isolated flush timer to CommitLogMetrics and ensure writes correspond to single WaitingOnCommit data points

Posted by GitBox <gi...@apache.org>.
maedhroz closed pull request #1080:
URL: https://github.com/apache/cassandra/pull/1080


   


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

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] maedhroz commented on pull request #1080: Add isolated flush timer to CommitLogMetrics and ensure writes correspond to single WaitingOnCommit data points

Posted by GitBox <gi...@apache.org>.
maedhroz commented on pull request #1080:
URL: https://github.com/apache/cassandra/pull/1080#issuecomment-867101956


   Committed in https://github.com/apache/cassandra/commit/5f23e6d766a18782db82d955bf380239990d2c84


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

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