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

[WIP] Bootstrap FC optimization: Base changes for Offline->Bootstrap #2946

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

piyujai
Copy link
Contributor

@piyujai piyujai commented Nov 20, 2024

No description provided.

@piyujai piyujai changed the title Base changes for Offline- Base changes for Offline->Bootstrap Nov 20, 2024
@piyujai piyujai changed the title Base changes for Offline->Bootstrap Bootstrap FC optimization: Base changes for Offline->Bootstrap Nov 20, 2024
@piyujai piyujai changed the title Bootstrap FC optimization: Base changes for Offline->Bootstrap [WIP] Bootstrap FC optimization: Base changes for Offline->Bootstrap Nov 20, 2024
@piyujai piyujai force-pushed the bootstrap_state_build_changes branch from b251c8c to 8b13123 Compare November 20, 2024 09:22
@@ -372,6 +372,11 @@ public class ClusterMapConfig {
@Default("false")
public final boolean clusterMapIgnoreDownwardStateTransition;

public static final String ENABLE_FILE_COPY_FOR_BOOTSTRAP = "clustermap.enable.file.copy.for.bootstrap";
@Config(ENABLE_FILE_COPY_FOR_BOOTSTRAP)
@Default("false")
Copy link
Contributor Author

@piyujai piyujai Nov 20, 2024

Choose a reason for hiding this comment

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

Merge into single config

@piyujai piyujai force-pushed the bootstrap_state_build_changes branch from 8b13123 to d857928 Compare November 20, 2024 10:26
@piyujai piyujai force-pushed the bootstrap_state_build_changes branch from d857928 to b4860e8 Compare November 20, 2024 10:27
@piyujai piyujai marked this pull request as draft November 20, 2024 19:45
throw new StateTransitionException(
"Existing Disk manager not found for replica " + partitionName + " is not found in clustermap for " + currentNode, DiskManagerNotFoundForFileCopyStateBuild);
}
diskManager.addBlobStoreToCompactionManager((BlobStore) store);
Copy link
Contributor Author

@piyujai piyujai Nov 21, 2024

Choose a reason for hiding this comment

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

store.start() and diskManager.addBlobStoreToCompactionManager((BlobStore) store) can be moved to file copy manager class later: Justin's suggestion

Choose a reason for hiding this comment

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

Can you elaborate as to why would that be advantageous?

public static final String ENABLE_FILE_COPY_FOR_BOOTSTRAP = "clustermap.enable.file.copy.for.bootstrap";
@Config(ENABLE_FILE_COPY_FOR_BOOTSTRAP)
@Default("false")
public final boolean enableFileCopyForBootstrap;

Choose a reason for hiding this comment

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

Keeping the nomenclature in this file consistent, the name of this key would be
clusterMapEnableFileCopyForBootstrap

@Config(ENABLE_FILE_COPY_FOR_BOOTSTRAP)
@Default("false")
public final boolean enableFileCopyForBootstrap;
public static final String ENABLE_FILE_COPY_FOR_BOOTSTRAP = "clustermap.enable.file.copy.for.bootstrap";

Choose a reason for hiding this comment

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

Either this or the the key defined in ClusterMapConfig needs to be removed.
Further,

  1. Key in this file will have store as prefix
  2. Keeping the nomenclature in this file consistent, the key name would be storeEnableFileCopyForBootstrap

if (!storeConfig.enableFileCopyForBootstrap) {
store.start();
}

// collect store segment requirements and add into DiskSpaceAllocator
List<DiskSpaceRequirements> storeRequirements = Collections.singletonList(store.getDiskSpaceRequirements());

Choose a reason for hiding this comment

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

If store.start() hasn't been invoked, in the normal Replication protocol, would store.getDiskSpaceRequirements() work as expected?

@@ -755,6 +760,8 @@ public void onPartitionBecomeBootstrapFromOffline(String partitionName) {
}
} while (!replicaAdded);


Choose a reason for hiding this comment

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

nit: remove unnecessary new lines.

Choose a reason for hiding this comment

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

Applicable throughout the diff wherever applicable.

throw new StateTransitionException(
"Existing Disk manager not found for replica " + partitionName + " is not found in clustermap for " + currentNode, DiskManagerNotFoundForFileCopyStateBuild);
}
diskManager.addBlobStoreToCompactionManager((BlobStore) store);

Choose a reason for hiding this comment

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

Can you elaborate as to why would that be advantageous?

@DevenAhluwalia
Copy link

This PR needs to be opened with target branch bootstrap-optimisation-lld-flow

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