hailin0 commented on code in PR #8456:
URL: https://github.com/apache/seatunnel/pull/8456#discussion_r1903284266


##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/tracing/MDCStream.java:
##########
@@ -53,62 +53,69 @@ public MDCStream(MDCContext context, Stream<T> delegate) {
 
     @Override
     public Stream<T> filter(Predicate<? super T> predicate) {
-        return new MDCStream<>(context, delegate.filter(new 
MDCPredicate<>(context, predicate)));
+        return new MDCStream<>(
+                context,
+                delegate.filter(new MDCPredicate<>(() -> 
MDCContext.of(context), predicate)));

Review Comment:
   Because element iteration caused repeated execution, it was changed to lazy 
initialization.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to