apache / apache/rocketmq-connect

WorkerSourceTask commitOffset in sync mode

Open
#321 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
141
Forks
120
PR merge metrics
No merged PRs in 30d

Description

WorkerSourceTask.java
```java
Future flushFuture = positionStorageWriter.doFlush((error, key, result) -> {
if (error != null) {
log.error("{} Failed to flush offsets to storage: ", WorkerSourceTask.this, error);
} else {
log.trace("{} Finished flushing offsets to storage", WorkerSourceTask.this);
}
});
try {
flushFuture.get(Math.max(timeout - System.currentTimeMillis(), 0), TimeUnit.MILLISECONDS);
}
```
WorkerSourceTask.commitOffsets will be called sync at each message, it's harmful to performance. IMO, we can use async to commitOffset.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.