Skip to content

[v18] Fix memory leak in access list reminder notifications#62663

Merged
tigrato merged 4 commits intobranch/v18from
bot/backport-62649-branch/v18
Jan 9, 2026
Merged

[v18] Fix memory leak in access list reminder notifications#62663
tigrato merged 4 commits intobranch/v18from
bot/backport-62649-branch/v18

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Jan 7, 2026

Backport #62649 to branch/v18

changelog: Fixed a memory leak in access list reminder notifications affecting clusters with more than 1000 pending Access List reviews.

Fixes a memory leak caused by variable shadowing where `nextKey` was
redeclared in the pagination loop instead of being assigned. This caused
the loop to always pass an empty pagination token, fetching the same
page repeatedly and never terminating for tenants with more than 1000
pending access list review notifications.

The fix renames the loop variable to `notificationsPageKey` to avoid
shadowing and properly updates it with the next page token.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Copy link
Copy Markdown
Contributor

@rosstimothy rosstimothy left a comment

Choose a reason for hiding this comment

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

Can we restore the rate limiting that was removed. It looks like Zac's comment was ignored on the original PR.

#62649 (comment)

@tigrato
Copy link
Copy Markdown
Contributor Author

tigrato commented Jan 7, 2026

Can we restore the rate limiting that was removed. It looks like Zac's comment was ignored on the original PR.

#62649 (comment)

We read ALs from the cache. All access lists are read from the cache much more frequently, including on every login, so I don’t see an issue here.

This PR re-introduces access list read rate limiting removed in #62649.
The PR had merge enabled and was merged without addressing the feedback.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@rosstimothy
Copy link
Copy Markdown
Contributor

We read ALs from the cache. All access lists are read from the cache much more frequently, including on every login, so I don’t see an issue here.

It wasn't obvious to me that you'd seen the comment, thought about it, or had rationale for removing it since the comment wasn't replied to. I'm not sure why the throttling was added in the first place. Let's give @fspmarshall a chance to chime in before we remove it entirely.

@tigrato
Copy link
Copy Markdown
Contributor Author

tigrato commented Jan 7, 2026

Can we restore the rate limiting that was removed. It looks like Zac's comment was ignored on the original PR.

#62649 (comment)

cherry-picked from #62670

@tigrato
Copy link
Copy Markdown
Contributor Author

tigrato commented Jan 7, 2026

We read ALs from the cache. All access lists are read from the cache much more frequently, including on every login, so I don’t see an issue here.

It wasn't obvious to me that you'd seen the comment, thought about it, or had rationale for removing it since the comment wasn't replied to. I'm not sure why the throttling was added in the first place. Let's give @fspmarshall a chance to chime in before we remove it entirely.

I didn't saw it. the PR had auto-merge enabled and since zac approved it, it merged

@rosstimothy rosstimothy dismissed their stale review January 7, 2026 17:48

Rate limiting has been restored.

@tigrato tigrato enabled auto-merge January 8, 2026 10:43
@tigrato tigrato added this pull request to the merge queue Jan 9, 2026
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from kopiczko January 9, 2026 12:42
Merged via the queue into branch/v18 with commit 711a4fd Jan 9, 2026
40 of 41 checks passed
@tigrato tigrato deleted the bot/backport-62649-branch/v18 branch January 9, 2026 13:02
@doggydogworld doggydogworld mentioned this pull request Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants