Skip to content

Commit

Permalink
fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
m-nagarajan committed Aug 22, 2023
1 parent 7817828 commit c689266
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ private void recordPerRouteMetrics(RequestContext requestContext, FastClientStat
clientStats.recordInternalServerErrorRequest(instance);
break;
case S_410_GONE:
/* Check {@link InstanceHealthMonitor#sendRequestToInstance} to understand this special http status. */
/* Check {@link InstanceHealthMonitor#trackHealthBasedOnRequestToInstance} to understand this special http status. */
clientStats.recordLeakedRequest(instance);
break;
case S_503_SERVICE_UNAVAILABLE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import com.linkedin.venice.common.VeniceSystemStoreType;
import com.linkedin.venice.common.VeniceSystemStoreUtils;
import com.linkedin.venice.compression.CompressionStrategy;
import com.linkedin.venice.compression.ZstdWithDictCompressor;
import com.linkedin.venice.controller.datarecovery.DataRecoveryManager;
import com.linkedin.venice.controller.exception.HelixClusterMaintenanceModeException;
import com.linkedin.venice.controller.helix.SharedHelixReadOnlyZKSharedSchemaRepository;
Expand Down Expand Up @@ -2574,8 +2575,12 @@ private Pair<Boolean, Version> addVersion(
compressionDictionaryBuffer =
ByteBuffer.wrap(EncodingUtils.base64DecodeFromString(compressionDictionary));
} else if (store.getCompressionStrategy().equals(CompressionStrategy.ZSTD_WITH_DICT)) {
throw new VeniceException(
"compression Dictionary should not be empty if CompressionStrategy is ZSTD_WITH_DICT");
// This compression strategy needs a dictionary even if there is no input data,
// so we generate a dictionary based on synthetic data. This is done in vpj driver
// as well, but this code will be triggered in cases like Samza batch push job
// which is independent of the vpj flow.
compressionDictionaryBuffer =
ByteBuffer.wrap(ZstdWithDictCompressor.buildDictionaryOnSyntheticAvroData());
}

final Version finalVersion = version;
Expand Down

0 comments on commit c689266

Please sign in to comment.