MINOR: Fix incorrect return value from upgradeFeatures #18958

Reviewers: Colin P. McCabe <cmccabe@apache.org>
This commit is contained in:
Calvin Liu 2025-02-19 09:41:06 -08:00 committed by GitHub
parent 3603c8fe35
commit f85c7d4696
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -677,7 +677,7 @@ public class ConfigurationControlManager {
log.info("{}", logMessage); log.info("{}", logMessage);
} }
records.addAll(result.records()); records.addAll(result.records());
return ControllerResult.atomicOf(records, null); return ControllerResult.atomicOf(records, ApiError.NONE);
} }
return result; return result;
} }

View File

@ -64,7 +64,7 @@ import static org.apache.kafka.common.config.ConfigResource.Type.TOPIC;
import static org.apache.kafka.common.metadata.MetadataRecordType.CONFIG_RECORD; import static org.apache.kafka.common.metadata.MetadataRecordType.CONFIG_RECORD;
import static org.apache.kafka.server.config.ConfigSynonym.HOURS_TO_MILLISECONDS; import static org.apache.kafka.server.config.ConfigSynonym.HOURS_TO_MILLISECONDS;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertNotNull;
@Timeout(value = 40) @Timeout(value = 40)
@ -472,7 +472,8 @@ public class ConfigurationControlManagerTest {
Collections.singletonMap(EligibleLeaderReplicasVersion.FEATURE_NAME, Collections.singletonMap(EligibleLeaderReplicasVersion.FEATURE_NAME,
FeatureUpdate.UpgradeType.UPGRADE), FeatureUpdate.UpgradeType.UPGRADE),
false); false);
assertNull(result.response()); assertNotNull(result.response());
assertEquals(Errors.NONE, result.response().error());
RecordTestUtils.replayAll(manager, result.records()); RecordTestUtils.replayAll(manager, result.records());
RecordTestUtils.replayAll(featureManager, result.records()); RecordTestUtils.replayAll(featureManager, result.records());