New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CASSANDRA-19336 5.0: Ensure that repair doesn't exceed repair_session_space by running repair jobs sequentially #3073
Conversation
…iting validation parallelism Co-authored-by: Andrés de la Peña <a.penya.garcia@gmail.com> Co-authored-by: David Capwell <dcapwell@apache.org>
} | ||
} | ||
|
||
abstract class Task<T> extends AsyncFuture<T> implements Runnable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this just org.apache.cassandra.concurrent.FutureTask
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is slightly different due to how the run
method sets a callback. I have moved the setting of that callback into the Task
class to encapsulate it better.
}); | ||
} | ||
}; | ||
session.validationScheduler.schedule(session.getId(), taskExecutor, syncTasks); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feel its cleaner to return Future<T>
from schedule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
} | ||
|
||
@Override | ||
public synchronized void schedule(TimeUUID sessionId, Executor taskExecutor, Task<?> tasks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the usage is a single task, so all sessions will have the same score
... so a simpler data structure could be used... this class makes the most sense when we have way to compare tasks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed it to a single queue of task-executor pairs.
No description provided.