Skip to content
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

Closed
wants to merge 7 commits into from

Conversation

adelapena
Copy link
Contributor

No description provided.

…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
Copy link
Contributor

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?

Copy link
Contributor Author

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);
Copy link
Contributor

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

Copy link
Contributor Author

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)
Copy link
Contributor

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

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants