Skip to content

Commit 2eb1e6b

Browse files
Nikola GrcevskiNikola Grcevski
authored andcommitted
Add comment about instanceConfig and fix benchmark driver server name configuration.
(cherry picked from commit b0dcfbfe5c9bdc5628fbf854fc8dade4c526eb0e)
1 parent d79d7e8 commit 2eb1e6b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public ZkHelixPropertyStore<ZNRecord> getPropertyStore() {
263263
*/
264264
private void addInstanceGroupTagIfNeeded() {
265265
InstanceConfig instanceConfig = getHelixInstanceConfig(_instanceId);
266-
assert instanceConfig != null;
266+
// The instanceConfig can be null when connecting as a participant while running from PerfBenchmarkRunner
267267
if (instanceConfig != null && !instanceConfig.containsTag(Helix.CONTROLLER_INSTANCE)) {
268268
LOGGER.info("Controller: {} doesn't contain group tag: {}. Adding one.", _instanceId, Helix.CONTROLLER_INSTANCE);
269269
instanceConfig.addTag(Helix.CONTROLLER_INSTANCE);

pinot-tools/src/main/java/org/apache/pinot/tools/perf/PerfBenchmarkDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ private void startServer()
238238
if (_segmentFormatVersion != null) {
239239
serverConfiguration.setProperty(CommonConstants.Server.CONFIG_OF_SEGMENT_FORMAT_VERSION, _segmentFormatVersion);
240240
}
241-
serverConfiguration.setProperty(CommonConstants.Helix.Instance.INSTANCE_ID_KEY, _serverInstanceName);
241+
serverConfiguration.setProperty(CommonConstants.Server.CONFIG_OF_INSTANCE_ID, _serverInstanceName);
242242
LOGGER.info("Starting server instance: {}", _serverInstanceName);
243243
new HelixServerStarter(_clusterName, _zkAddress, serverConfiguration);
244244
}

0 commit comments

Comments
 (0)