Skip to content

Commit

Permalink
[samza] Use concurrent hashmap for key schema str
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourav Maji committed Mar 3, 2025
1 parent 1243dfe commit 0d0b1f5
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import com.linkedin.venice.serialization.avro.SchemaPresenceChecker;
import com.linkedin.venice.serializer.FastSerializerDeserializerFactory;
import com.linkedin.venice.serializer.RecordSerializer;
import com.linkedin.venice.utils.BoundedHashMap;
import com.linkedin.venice.utils.Pair;
import com.linkedin.venice.utils.PartitionUtils;
import com.linkedin.venice.utils.SystemTime;
Expand Down Expand Up @@ -136,7 +135,7 @@ public class VeniceSystemProducer implements SystemProducer, Closeable {
private Schema keySchema;
private String canonicalKeySchemaStr;
// To avoid the excessive usage of the cache in case each message is using a unique key schema
private final Map<Schema, String> canonicalSchemaStrCache = new BoundedHashMap<>(10, true);
private final Map<Schema, String> canonicalSchemaStrCache = new VeniceConcurrentHashMap<>(10);

private D2Client primaryControllerColoD2Client;
private D2Client childColoD2Client;
Expand Down

0 comments on commit 0d0b1f5

Please sign in to comment.