You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "VGalaxies (via GitHub)" <gi...@apache.org> on 2024/04/10 09:05:32 UTC
[PR] Pipe: clear event reference count instead decreasing when closing to improve idempotence [iotdb]
VGalaxies opened a new pull request, #12315:
URL: https://github.com/apache/iotdb/pull/12315
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Pipe: clear event reference count instead decreasing when closing to improve idempotence [iotdb]
Posted by "SteveYurongSu (via GitHub)" <gi...@apache.org>.
SteveYurongSu commented on code in PR #12315:
URL: https://github.com/apache/iotdb/pull/12315#discussion_r1559395643
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/connector/payload/evolvable/builder/PipeTransferBatchReqBuilder.java:
##########
@@ -209,5 +214,11 @@ public synchronized void close() {
}
}
allocatedMemoryBlock.close();
+
+ isClosed.set(true);
+ }
Review Comment:
```suggestion
@Override
public synchronized void close() {
// Always set isClosed to true first to avoid ..
isClosed.set(true);
for (final Event event : events) {
if (event instanceof EnrichedEvent) {
((EnrichedEvent) event).clearReferenceCount(this.getClass().getName());
}
}
allocatedMemoryBlock.close();
}```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Pipe: clear event reference count instead decreasing when closing to improve idempotence [iotdb]
Posted by "SteveYurongSu (via GitHub)" <gi...@apache.org>.
SteveYurongSu commented on code in PR #12315:
URL: https://github.com/apache/iotdb/pull/12315#discussion_r1559383135
##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/progress/PipeEventCommitter.java:
##########
@@ -66,9 +66,10 @@ public synchronized void commit(EnrichedEvent event) {
if (e.getCommitId() <= lastCommitId.get()) {
LOGGER.warn(
- "commit id must be monotonically increasing, lastCommitId: {}, event: {}",
+ "commit id must be monotonically increasing, lastCommitId: {}, event: {}, stack trace: {}",
lastCommitId.get(),
- e);
+ e,
+ Thread.currentThread().getStackTrace());
Review Comment:
```suggestion
Thread.currentThread().getStackTrace(),
e);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Pipe: clear event reference count instead decreasing when closing to improve idempotence [iotdb]
Posted by "VGalaxies (via GitHub)" <gi...@apache.org>.
VGalaxies commented on code in PR #12315:
URL: https://github.com/apache/iotdb/pull/12315#discussion_r1559107741
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/task/subtask/processor/PipeProcessorSubtask.java:
##########
@@ -142,7 +142,8 @@ protected boolean executeOnce() throws Exception {
outputEventCollector);
}
}
- releaseLastEvent(!isClosed.get() && outputEventCollector.hasNoCollectInvocationAfterReset());
+ decreaseReferenceCountAndReleaseLastEvent(
+ !isClosed.get() && outputEventCollector.hasNoCollectInvocationAfterReset());
Review Comment:
TBD
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Pipe: clear event reference count instead decreasing when closing to improve idempotence [iotdb]
Posted by "SteveYurongSu (via GitHub)" <gi...@apache.org>.
SteveYurongSu commented on code in PR #12315:
URL: https://github.com/apache/iotdb/pull/12315#discussion_r1559383135
##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/progress/PipeEventCommitter.java:
##########
@@ -66,9 +66,10 @@ public synchronized void commit(EnrichedEvent event) {
if (e.getCommitId() <= lastCommitId.get()) {
LOGGER.warn(
- "commit id must be monotonically increasing, lastCommitId: {}, event: {}",
+ "commit id must be monotonically increasing, lastCommitId: {}, event: {}, stack trace: {}",
lastCommitId.get(),
- e);
+ e,
+ Thread.currentThread().getStackTrace());
Review Comment:
```suggestion
Thread.currentThread().getStackTrace(),
e);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Pipe: clear event reference count instead of decreasing when closing to improve idempotence & add creation time for committer key to avoid outdated commit & detect re-increasing reference count to avoid NPE [iotdb]
Posted by "SteveYurongSu (via GitHub)" <gi...@apache.org>.
SteveYurongSu merged PR #12315:
URL: https://github.com/apache/iotdb/pull/12315
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org