Skip to content

Conversation

@JAkutenshi
Copy link
Contributor

@JAkutenshi JAkutenshi commented Dec 28, 2025

JIRA Ticket: IGNITE-27437

The goal

The goal is to introduce new functional interface that computes partition count for a new zone without partition count specified.

The reason

We want to implement dynamic default partition count computation in IGNITE-27279, this PR is prerequisite.

The solution

New entities are introduced. The wrapper will use later with new producer implementation. The intention of the wrapper is to decouple catalog manager and wrapped producer update, because the last may be done outside of IgniteImpl constructor or require components that require CatalogManager itself. Instead of new setter for the manager better to decouple it with wrapper.

@JAkutenshi JAkutenshi marked this pull request as ready for review December 29, 2025 01:09
* Parameters container for {@link PartitionCountProvider#calculate}.
*/
public final class PartitionCountCalculationParameters {
/** Data nodes filter. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

such comments doesn't bring any value. Please provide meaningful one or just drop these

* Test-only constructor.
*/
@TestOnly
public CatalogManagerImpl(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's have only one constructor. There are not so many usages

newDefaultZoneId,
DEFAULT_ZONE_NAME,
DEFAULT_PARTITION_COUNT,
defaultZonePartitionCount(partitionCountProvider),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's better to set parameters explicitly

/**
* Wrapper that allows to apply and use different partition count computing approaches.
*/
public final class PartitionCountProviderWrapper implements PartitionCountProvider {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrapper should be moved to runner module. Also, what about tests for this class?

*/
public final class PartitionCountProviderWrapper implements PartitionCountProvider {
/** Wrapped delegate to compute partition count. */
private PartitionCountProvider delegate;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's have it volatile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants