Skip to content

Commit

Permalink
[controller] CI build fix (linkedin#997)
Browse files Browse the repository at this point in the history
  • Loading branch information
majisourav99 authored May 21, 2024
1 parent d0f931b commit 0a64bf4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,8 @@ Optional<String> getTopicForCurrentPushJob(
final String latestTopicName = latestTopic.get().getName();
int versionNumber = Version.parseVersionFromKafkaTopicName(latestTopicName);
Store store = getStore(clusterName, storeName);
if (store.getVersion(versionNumber).map(Version::isVersionSwapDeferred).orElse(false)) {
Version version = store.getVersion(versionNumber);
if (version != null && version.isVersionSwapDeferred()) {
LOGGER.error(
"There is already future version {} exists for store {}, please wait till the future version is made current.",
versionNumber,
Expand Down Expand Up @@ -3545,7 +3546,8 @@ private OfflinePushStatusInfo getOffLineJobStatus(
try (AutoCloseableLock ignore = resources.getClusterLockManager().createStoreWriteLock(storeName)) {
ReadWriteStoreRepository repository = resources.getStoreMetadataRepository();
Store parentStore = repository.getStore(storeName);
boolean isDeferredSwap = parentStore.getVersion(versionNum).map(Version::isVersionSwapDeferred).orElse(false);
Version version = parentStore.getVersion(versionNum);
boolean isDeferredSwap = version != null && version.isVersionSwapDeferred();
if (!isDeferredSwap) {
// targetedRegions is non-empty for target region push of batch store
boolean isTargetRegionPush = !StringUtils.isEmpty(targetedRegions);
Expand Down

0 comments on commit 0a64bf4

Please sign in to comment.