dcapwell commented on code in PR #101:
URL: https://github.com/apache/cassandra-accord/pull/101#discussion_r1664764129
##########
accord-core/src/main/java/accord/coordinate/Exhausted.java:
##########
@@ -37,4 +39,16 @@ public Exhausted(TxnId txnId, @Nullable RoutingKey homeKey,
String message)
{
super(txnId, homeKey, message);
}
+
+ protected Exhausted(TxnId txnId, @Nullable RoutingKey homeKey, Exhausted
cause)
+ {
+ super(txnId, homeKey, cause);
+ }
+
+ @Override
+ public Exhausted wrap()
+ {
+ checkState(this.getClass() == Exhausted.class);
Review Comment:
you could replace this with `final` in `wrap`
##########
accord-core/src/main/java/accord/config/LocalConfig.java:
##########
@@ -19,11 +19,26 @@
package accord.config;
import java.time.Duration;
+import java.time.temporal.ChronoUnit;
public interface LocalConfig
{
+ LocalConfig DEFAULT = new LocalConfig() {};
+
default Duration getProgressLogScheduleDelay()
{
return Duration.ofSeconds(1);
}
+
+ // How long before we start notifying waiters on an epoch of timeout,
+ default Duration epochFetchInitialTimeout()
+ {
+ return Duration.of(10, ChronoUnit.SECONDS);
+ }
+
+ // How often to check for timeout, and once an epoch has timed out, how
often we timeout new waiters
+ default Duration epochFetchWatchdogInterval()
+ {
+ return Duration.of(10, ChronoUnit.SECONDS);
Review Comment:
nit:
```suggestion
return Duration.ofSeconds(10);
```
##########
accord-core/src/main/java/accord/config/LocalConfig.java:
##########
@@ -19,11 +19,26 @@
package accord.config;
import java.time.Duration;
+import java.time.temporal.ChronoUnit;
public interface LocalConfig
{
+ LocalConfig DEFAULT = new LocalConfig() {};
+
default Duration getProgressLogScheduleDelay()
{
return Duration.ofSeconds(1);
}
+
+ // How long before we start notifying waiters on an epoch of timeout,
+ default Duration epochFetchInitialTimeout()
+ {
+ return Duration.of(10, ChronoUnit.SECONDS);
Review Comment:
nit:
```suggestion
return Duration.ofSeconds(10);
```
--
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]