Skip to content

Commit 382ce3e

Browse files
pthirunclaude
andcommitted
Add LogContext to VPJ timeout executor and bump thread pool to 2
Pass LogContext with store name to DaemonThreadFactory so monitor threads carry context in log lines. Bump pool from single thread to 2 so timeout and kill-check monitors don't contend. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e807e52 commit 382ce3e

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

clients/venice-push-job/src/main/java/com/linkedin/venice/hadoop/VenicePushJob.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
import com.linkedin.venice.utils.DictionaryUtils;
153153
import com.linkedin.venice.utils.EncodingUtils;
154154
import com.linkedin.venice.utils.LatencyUtils;
155+
import com.linkedin.venice.utils.LogContext;
155156
import com.linkedin.venice.utils.PartitionUtils;
156157
import com.linkedin.venice.utils.ReflectUtils;
157158
import com.linkedin.venice.utils.RegionUtils;
@@ -291,8 +292,12 @@ public VenicePushJob(String jobId, Properties vanillaProps, D2Client d2Client) {
291292
this.jobId = jobId;
292293
this.externalD2Client = d2Client;
293294
this.props = getVenicePropsFromVanillaProps(Objects.requireNonNull(vanillaProps, "VPJ props cannot be null"));
294-
this.timeoutExecutor = Executors
295-
.newSingleThreadScheduledExecutor(new DaemonThreadFactory(this.getClass().getName() + "-VPJTimeoutExecutor"));
295+
String storeName = this.props.getString(VENICE_STORE_NAME_PROP);
296+
LogContext logContext =
297+
LogContext.newBuilder().setComponentName("VenicePushJob").setInstanceName(storeName).build();
298+
this.timeoutExecutor = Executors.newScheduledThreadPool(
299+
2,
300+
new DaemonThreadFactory(this.getClass().getName() + "-VPJTimeoutExecutor", logContext));
296301
LOGGER.info("Constructing {}: {}", VenicePushJob.class.getSimpleName(), props.toString(true));
297302
this.sslProperties = Lazy.of(() -> {
298303
try {

0 commit comments

Comments
 (0)