yangjj-iso opened a new pull request, #7793: URL: https://github.com/apache/shenyu/pull/7793
Fixes #7637. Current master already runs chain cleanup on terminal signals, but starts timing when handle() constructs the publisher and reuses one mutable plugin chain for subsequent subscriptions. Defer both timing initialization and chain creation until subscription. Each sequential subscription executes a fresh chain, and completion, failure or cancellation ends its timing exactly once. Use System.nanoTime() for elapsed duration, retaining milliseconds in the debug log. Timing starts before subscribeOn, so it includes scheduler queueing as well as delayed/streaming processing through the terminal signal. Publisher construction alone has no timing side effects. Plugin hook compatibility: audited ShenyuPlugin, AbstractWasmPlugin and AbstractShenyuWasmPlugin. Preserve and document the existing plugin before/after publisher-construction semantics, including WASM callbacks; this change only corrects the gateway chain lifecycle. Validation: - Added 13 deterministic lifecycle cases covering completion, asynchronous error, synchronous plugin exception, cancellation, delayed completion and fresh sequential subscriptions with scheduling both enabled and disabled, plus cancellation before scheduled execution. Existing trace-ID logging tests remain green. Regression tests fail on the unchanged master implementation. - `./mvnw -B -pl shenyu-web -am test -Dmaven.javadoc.skip=true -Djacoco.skip=true` — 985 passed, 1 existing skipped test across the selected reactor; shenyu-web itself passed 114/114. Checkstyle passed. - `./mvnw -B -pl shenyu-web,shenyu-plugin/shenyu-plugin-api apache-rat:check` — passed. The full repository build and Docker end-to-end suite were not run. -- 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]
