You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "dubbo-go-bot (via GitHub)" <gi...@apache.org> on 2026/08/24 02:57:28 UTC

[PR] fix(accesslog): avoid max latency after decode short-circuit [dubbo-go-pixiu]

dubbo-go-bot opened a new pull request, #1020:
URL: https://github.com/apache/dubbo-go-pixiu/pull/1020

   ## 🔄 Upstream Sync from Community Fork
   
   This PR automatically syncs changes from the community fork to the upstream repository.
   
   ### Original Contribution
   
   - **Author**: @EmptyCity-111
   - **Original PR**: https://github.com/dubbo-go-pixiu/dubbo-go-pixiu/pull/116
   - **Merged at**: 2026-08-24 02:57:24 UTC
   
   ### Original PR Description
   
   ---
   
   **What this PR does**:
   
   The access-log filter records its start timestamp in `Decode`. When an earlier
   decode filter returns `filter.Stop`, access-log decode is skipped, but the HTTP
   connection manager still runs the complete reverse encode chain. The access-log
   encode path then computes `time.Since` from Go's zero `time.Time`, which
   saturates at `time.Duration(math.MaxInt64)` and logs
   `9223372036854775807` nanoseconds.
   
   This change:
   
   - initializes a per-request fallback start timestamp when the access-log filter
     is added to the chain;
   - keeps the existing `Decode` assignment so normally decoded requests retain
     the current timing boundary;
   - adds a regression test using the real filter chain, with an earlier filter
     stopping decode before access logging.
   
   There are no filter-chain API or access-log format changes.
   
   **Which issue(s) this PR fixes**:
   
   Fixes https://github.com/apache/dubbo-go-pixiu/issues/1015
   
   The same MaxInt64 value is visible in the error-path log attached to
   https://github.com/apache/dubbo-go-pixiu/issues/724.
   
   **Special notes for your reviewer**:
   
   The fallback timestamp is created per request in `PrepareFilterChain`; it is not
   shared by the factory. `Decode` still refreshes the timestamp when access-log
   decode is reached, so the normal request path is unchanged.
   
   Before the production change, the new regression test failed with:
   
   ```text
   "2562047h47m16.854775807s" is not less than "1m0s"
   ```
   
   Validation on the fixed implementation:
   
   ```text
   go test ./pkg/filter/accesslog -run TestEncodeWithoutDecodeReportsBoundedLatency -count=1
   go test ./pkg/filter/accesslog -count=1
   go test -race ./pkg/filter/accesslog ./pkg/common/extension/filter ./pkg/common/http -count=1
   go vet ./pkg/filter/accesslog ./pkg/common/extension/filter ./pkg/common/http
   golangci-lint run ./pkg/filter/accesslog
   go test ./...
   git diff --check
   ```
   
   All commands pass on `develop` at `60fcbf17` with this change.
   
   **Does this PR introduce a user-facing change?**:
   
   ```release-note
   Access logs no longer report MaxInt64 latency when HTTP decode is short-circuited by an earlier filter.
   ```
   
   ## Summary by Sourcery
   
   Ensure access log latency is bounded when HTTP decode is short-circuited by an earlier filter.
   
   Bug Fixes:
   - Prevent access logs from recording MaxInt64 latency when the access-log decode phase is skipped due to an earlier filter stopping decode.
   
   Tests:
   - Add an integration-style test that builds a real filter chain with a short-circuiting decode filter to verify encode-only access logging reports bounded latency.
   
   <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
   
   ## Summary by CodeRabbit
   
   * **Bug Fixes**
     * Access logs now consistently include a valid, bounded latency value, including when request processing stops early.
   
   * **Tests**
     * Added coverage to verify access-log entries are emitted correctly after decode termination and contain parseable latency information.
   
   <!-- end of auto-generated comment: release notes by coderabbit.ai -->
   
   ---
   
   All commits preserve original authorship.
   
   **Note**: Auto-created when PR #116 was merged into `dubbo-go-pixiu/dubbo-go-pixiu:develop`.
   
   cc @EmptyCity-111
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(accesslog): avoid max latency after decode short-circuit [dubbo-go-pixiu]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1020:
URL: https://github.com/apache/dubbo-go-pixiu/pull/1020#issuecomment-5390246671

   ## [Codecov](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/1020?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 34.49%. Comparing base ([`153c1fe`](https://app.codecov.io/gh/apache/dubbo-go-pixiu/commit/153c1fe0fcc03aeeae19094285ad1b4112c026c4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`12636d5`](https://app.codecov.io/gh/apache/dubbo-go-pixiu/commit/12636d531ae1d71ed12858ddf3c4eb52d7845611?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop    #1020      +/-   ##
   ===========================================
   + Coverage    34.45%   34.49%   +0.03%     
   ===========================================
     Files          291      291              
     Lines        24429    24430       +1     
   ===========================================
   + Hits          8417     8426       +9     
   + Misses       15194    15186       -8     
     Partials       818      818              
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/1020/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [unittests](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/1020/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.49% <100.00%> (+0.03%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/1020?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(accesslog): avoid max latency after decode short-circuit [dubbo-go-pixiu]

Posted by "baerwang (via GitHub)" <gi...@apache.org>.
baerwang merged PR #1020:
URL: https://github.com/apache/dubbo-go-pixiu/pull/1020


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] fix(accesslog): avoid max latency after decode short-circuit [dubbo-go-pixiu]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #1020:
URL: https://github.com/apache/dubbo-go-pixiu/pull/1020#issuecomment-5390185462

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=1020) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=1020&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=1020&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=1020&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=1020&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=1020&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=1020)
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org