Skip to content

Update dskit#14406

Open
pracucci wants to merge 1 commit intomainfrom
update-dskit
Open

Update dskit#14406
pracucci wants to merge 1 commit intomainfrom
update-dskit

Conversation

@pracucci
Copy link
Collaborator

What this PR does

Update dskit to get grafana/dskit#916.

Which issue(s) this PR fixes or relates to

N/A

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]. If changelog entry is not needed, please add the changelog-not-needed label to the PR.
  • about-versioning.md updated with experimental features.

@pracucci pracucci marked this pull request as ready for review February 18, 2026 18:34
@pracucci pracucci requested review from a team, stevesg and tacole02 as code owners February 18, 2026 18:34
@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2026

Copy link
Contributor

@alexweav alexweav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pracucci pracucci enabled auto-merge (squash) February 19, 2026 08:01
if !state.isExpired() {
state.lastSeen = now
m.connectionsMu.Unlock()
return false
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing idleExpired flag reset allows premature cache eviction

Low Severity

In removeExpiredConnection, when a request arrives for an existing non-expired connection, state.lastSeen is updated but state.idleExpired is not reset to false. The comment on removeIdleExpiredConnections explicitly states the entry is deleted "if no request arrived in between," implying a request arrival should clear the idle mark. Without the reset, a connection previously marked idle that later receives a request will be immediately evicted on the next idle pass (skipping the two-phase protection), causing it to get a fresh TTL when the next request arrives — contradicting the intended lifetime enforcement.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will look at this separately. Not a blocker.

@cursor
Copy link

cursor bot commented Feb 19, 2026

Bugbot Autofix prepared fixes for 1 of the 1 bugs found in the latest run.

  • ✅ Fixed: Missing idleExpired flag reset allows premature cache eviction
    • Added state.idleExpired = false when updating lastSeen to properly reset the idle flag and maintain the two-phase cleanup contract.

Create PR

Or push these changes by commenting:

@cursor push 37227820df
Preview (37227820df)
diff --git a/vendor/github.com/grafana/dskit/middleware/http_connection_ttl_middleware.go b/vendor/github.com/grafana/dskit/middleware/http_connection_ttl_middleware.go
--- a/vendor/github.com/grafana/dskit/middleware/http_connection_ttl_middleware.go
+++ b/vendor/github.com/grafana/dskit/middleware/http_connection_ttl_middleware.go
@@ -160,6 +160,7 @@
 	}
 	if !state.isExpired() {
 		state.lastSeen = now
+		state.idleExpired = false
 		m.connectionsMu.Unlock()
 		return false
 	}

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is ON. A Cloud Agent has been kicked off to fix the reported issue.

* [FEATURE] Ingester: Added experimental support to run ingesters with no tokens in the ring when ingest storage is enabled. You can set `-ingester.ring.num-tokens=0` to enable this feature. #14024
* [FEATURE] Store-gateway: Add `-store-gateway.sharding-ring.excluded-zones` flag to exclude specific zones from the store-gateway ring. #14120
* [FEATURE] Ingest storage: Add `-ingest-storage.kafka.sasl-mechanism` flag supporting more ways to authenticate with Kafka. #14307 #14344
* [FEATURE] Ingest storage: Add `-ingest-storage.kafka.sasl-mechanism` flag to use SCRAM to authenticate with Kafka. #14307
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate CHANGELOG entry for sasl-mechanism feature

Low Severity

A duplicate changelog entry was added for the -ingest-storage.kafka.sasl-mechanism flag. Line 47 already documents this feature referencing both #14307 and #14344, while the newly added line 48 describes the same flag with slightly different wording and only references #14307. This appears to be accidentally committed.

Fix in Cursor Fix in Web

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

Comments