-
Notifications
You must be signed in to change notification settings - Fork 276
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
base: master
Are you sure you want to change the base?
Conversation
b251c8c
to
8b13123
Compare
@@ -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") |
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.
Merge into single config
8b13123
to
d857928
Compare
d857928
to
b4860e8
Compare
throw new StateTransitionException( | ||
"Existing Disk manager not found for replica " + partitionName + " is not found in clustermap for " + currentNode, DiskManagerNotFoundForFileCopyStateBuild); | ||
} | ||
diskManager.addBlobStoreToCompactionManager((BlobStore) store); |
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.
store.start() and diskManager.addBlobStoreToCompactionManager((BlobStore) store) can be moved to file copy manager class later: Justin's suggestion
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.
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; |
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.
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"; |
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.
Either this or the the key defined in ClusterMapConfig needs to be removed.
Further,
- Key in this file will have
store
as prefix - 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()); |
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.
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); | |||
|
|||
|
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.
nit: remove unnecessary new lines.
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.
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); |
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.
Can you elaborate as to why would that be advantageous?
This PR needs to be opened with target branch |
No description provided.