Skip to content

Fix shutdown flush context handling in chip ingress batch client#1832

Merged
hendoxc merged 1 commit intoINFOPLAT-3099-chip-ingress-batchingfrom
INFOPLAT-3099-chip-ingress-batching-fix-shutdown-flush-context-timeout
Feb 11, 2026
Merged

Fix shutdown flush context handling in chip ingress batch client#1832
hendoxc merged 1 commit intoINFOPLAT-3099-chip-ingress-batchingfrom
INFOPLAT-3099-chip-ingress-batching-fix-shutdown-flush-context-timeout

Conversation

@pkcll
Copy link
Copy Markdown
Contributor

@pkcll pkcll commented Feb 10, 2026

Summary

  • ensure flush-on-cancel/shutdown does not publish with an already canceled context
  • keep publish calls bounded via existing maxPublishTimeout in sendBatch
  • add regression checks asserting cancellation-path publish contexts are not canceled

Test plan

  • go test ./batch

@github-actions
Copy link
Copy Markdown

✅ API Diff Results - No breaking changes


📄 View full apidiff report

@hendoxc hendoxc marked this pull request as ready for review February 11, 2026 15:04
@hendoxc hendoxc requested a review from a team as a code owner February 11, 2026 15:04
@hendoxc hendoxc merged commit 53d52a8 into INFOPLAT-3099-chip-ingress-batching Feb 11, 2026
23 of 24 checks passed
@hendoxc hendoxc deleted the INFOPLAT-3099-chip-ingress-batching-fix-shutdown-flush-context-timeout branch February 11, 2026 15:04
github-merge-queue Bot pushed a commit that referenced this pull request Feb 12, 2026
* Adds chipingress batching client

* Adds unit-tests

FIxes test

* Removes copying of slice

* Adds zap logger

* Fixes mod file

* FIxes linting

* Rename timeout vars

* Adds callback mechanism

* fixes linting

* Move callback execution into separate goroutine

stops semaphore blocking on callback execution to complete

* check for shutdown

* Ensures all callbacks complete after .Stop

- ensures no panic if .Stop is called multiple times

* Removes compression type

* Adjust configuration

* Return errors from queue message

* Adds buffer

* Correct shutdown protocol

* Fix linting errors

* Fixes linting

* Addresses comments

* Uses `services.StopChan`

derives contexts

* linter fixes

* Removes `services.StopChan` usage

circular dependency on `common`

* Make buffer generic

* simplify

* Removes unused functions

adds comment

* fix batch flush publish context on shutdown (#1832)

* Removes unused code

---------

Co-authored-by: Pavel <177363085+pkcll@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants