You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "ifesdjeen (via GitHub)" <gi...@apache.org> on 2025/04/09 21:12:25 UTC
[PR] Cassandra 20542 [cassandra]
ifesdjeen opened a new pull request, #4074:
URL: https://github.com/apache/cassandra/pull/4074
(no comment)
--
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 20542 [cassandra]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith commented on code in PR #4074:
URL: https://github.com/apache/cassandra/pull/4074#discussion_r2036705873
##########
src/java/org/apache/cassandra/concurrent/InfiniteLoopExecutor.java:
##########
@@ -53,12 +53,17 @@ public enum InternalState { SHUTTING_DOWN_NOW, TERMINATED }
public enum SimulatorSafe { SAFE, UNSAFE }
/**
- * Does this loop always block on some external work provision that is going to be simulator-controlled, or does
- * it loop periodically? If the latter, it may prevent simulation making progress between phases, and should be
- * marked as a DAEMON process.
+ * Simulator Tag specifies the nature of the created thread:
+ *
+ * * JOB threads are short-lived, and simulation will wait for them to terminate before completing an enclosing Work unit
+ * * DAEMON threads can outlive the enclosing work unit during simulation; and will also
+ * * INFINITE_LOOP threads are intended for looping "forever", and are explicitly marked as such to distinguish them from
Review Comment:
INFINITE_LOOP threads detach from their parent task as they are expected to run forever, but unlike DAEMON threads must have no active work for a given Work phase to complete.
--
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 20542 [cassandra]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith commented on code in PR #4074:
URL: https://github.com/apache/cassandra/pull/4074#discussion_r2036703666
##########
src/java/org/apache/cassandra/concurrent/InfiniteLoopExecutor.java:
##########
@@ -53,12 +53,17 @@ public enum InternalState { SHUTTING_DOWN_NOW, TERMINATED }
public enum SimulatorSafe { SAFE, UNSAFE }
/**
- * Does this loop always block on some external work provision that is going to be simulator-controlled, or does
- * it loop periodically? If the latter, it may prevent simulation making progress between phases, and should be
- * marked as a DAEMON process.
+ * Simulator Tag specifies the nature of the created thread:
+ *
+ * * JOB threads are short-lived, and simulation will wait for them to terminate before completing an enclosing Work unit
+ * * DAEMON threads can outlive the enclosing work unit during simulation; and will also
Review Comment:
`DAEMON` threads are treated as background tasks, and are neither linked to their parent task or the `Work` phase that creates them.
--
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 20542 [cassandra]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith commented on code in PR #4074:
URL: https://github.com/apache/cassandra/pull/4074#discussion_r2036718810
##########
test/simulator/main/org/apache/cassandra/simulator/systems/InterceptingExecutorFactory.java:
##########
@@ -327,8 +326,11 @@ public ExecutorPlus pooled(String name, int threads)
return configurePooled(name, threads).build();
}
- public Thread startThread(String name, Runnable runnable, Daemon daemon)
+ public Thread startThread(String name, Runnable runnable, InfiniteLoopExecutor.SimulatorTag simulatorTag)
{
+ if (simulatorTag == InfiniteLoopExecutor.SimulatorTag.INFINITE_LOOP)
Review Comment:
`switch`? Should probably handle all three cases
--
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 20542 [cassandra]
Posted by "maedhroz (via GitHub)" <gi...@apache.org>.
maedhroz closed pull request #4074: Cassandra 20542
URL: https://github.com/apache/cassandra/pull/4074
--
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 20542 [cassandra]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith commented on code in PR #4074:
URL: https://github.com/apache/cassandra/pull/4074#discussion_r2036701972
##########
src/java/org/apache/cassandra/concurrent/InfiniteLoopExecutor.java:
##########
@@ -53,12 +53,17 @@ public enum InternalState { SHUTTING_DOWN_NOW, TERMINATED }
public enum SimulatorSafe { SAFE, UNSAFE }
/**
- * Does this loop always block on some external work provision that is going to be simulator-controlled, or does
- * it loop periodically? If the latter, it may prevent simulation making progress between phases, and should be
- * marked as a DAEMON process.
+ * Simulator Tag specifies the nature of the created thread:
+ *
+ * * JOB threads are short-lived, and simulation will wait for them to terminate before completing an enclosing Work unit
Review Comment:
JOB threads are short-lived and simulation treats them as _sub tasks_ of the task that creates them, so that the strictly ordered property of the simulator ensures the thread terminates before the next task of its parent is scheduled.
--
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 20542 [cassandra]
Posted by "belliottsmith (via GitHub)" <gi...@apache.org>.
belliottsmith commented on code in PR #4074:
URL: https://github.com/apache/cassandra/pull/4074#discussion_r2036719745
##########
test/simulator/main/org/apache/cassandra/simulator/systems/InterceptingExecutorFactory.java:
##########
@@ -341,7 +343,7 @@ public InterceptedExecution.InterceptedThreadStart startParked(String name, Runn
}
@Override
- public Interruptible infiniteLoop(String name, Task task, SimulatorSafe simulatorSafe, Daemon daemon, Interrupts interrupts)
+ public Interruptible infiniteLoop(String name, Task task, SimulatorSafe simulatorSafe, Interrupts interrupts)
Review Comment:
this probably needs to handle `JOB` now too?
--
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