Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nisargthakkar committed Aug 22, 2024
1 parent a81e40e commit 0d3e2c1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ private ConfigKeys() {

/**
* Whether the superset schema generation in Primary Controller should be done via passed callback or not.
* @deprecated Use {@link #CONTROLLER_EXTERNAL_SUPERSET_SCHEMA_GENERATION_ENABLED}
*/
@Deprecated
public static final String CONTROLLER_PARENT_EXTERNAL_SUPERSET_SCHEMA_GENERATION_ENABLED =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface HybridStoreConfig extends DataModelBackedStructure<StoreHybridC
HybridStoreConfig clone();

default boolean isHybrid() {
return this.getRewindTimeInSeconds() >= 0 && (this.getOffsetLagThresholdToGoOnline() >= 0
|| this.getProducerTimestampLagThresholdToGoOnlineInSeconds() >= 0);
return getRewindTimeInSeconds() >= 0
&& (getOffsetLagThresholdToGoOnline() >= 0 || getProducerTimestampLagThresholdToGoOnlineInSeconds() >= 0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,16 @@ public static int calculatePartitionCount(
} else if (partitionCount < minPartitionCount) {
partitionCount = minPartitionCount;
}

int returnPartitionCount = partitionCount <= 0 ? 1 : (int) partitionCount;

LOGGER.info(
"Assign partition count: {} calculated by storage quota: {} to the new version of store: {}",
partitionCount,
returnPartitionCount,
storageQuota,
storeName);

// At least 1 partition
return partitionCount <= 0 ? 1 : (int) partitionCount;
return returnPartitionCount;
}

public static VenicePartitioner getVenicePartitioner(PartitionerConfig config) {
Expand Down

0 comments on commit 0d3e2c1

Please sign in to comment.