Skip to content

Address review feedback: Add JavaDoc, fix typo, wire up leak detection#47202

Closed
Copilot wants to merge 5 commits intousers/fabianm/TestImprovementsfrom
copilot/sub-pr-47200-again
Closed

Address review feedback: Add JavaDoc, fix typo, wire up leak detection#47202
Copilot wants to merge 5 commits intousers/fabianm/TestImprovementsfrom
copilot/sub-pr-47200-again

Conversation

Copy link
Contributor

Copilot AI commented Nov 7, 2025

Description

Addresses review feedback on leak detection infrastructure PR. Issues resolved:

  1. Added comprehensive JavaDoc to StackTraceUtil - Documents purpose (diagnostic stack trace capture), performance implications, and thread-safety guarantees.

  2. Fixed typo in RxDocumentClientImpl - "teh" → "the" in JavaDoc.

  3. Wired up client leak detection lifecycle hook in close() method:

    • Call removeFromActiveClients() at start of close() before resource cleanup
    • The corresponding addToActiveClients() call is already in the constructor (line 517)
    • Enables tracking of active clients when COSMOS.CLIENT_LEAK_DETECTION_ENABLED is set
  4. Removed redundant addToActiveClients() call - Duplicate call in init() method was removed after merge, keeping only the constructor call (line 517).

Without these changes, the activeClients map would not be properly maintained and leak detection would be non-functional.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…n methods

Co-authored-by: FabianMeiswinkel <19165014+FabianMeiswinkel@users.noreply.github.com>
Copilot AI changed the title [WIP] Add changes to implement leak detection Address review feedback: Add JavaDoc, fix typo, wire up leak detection Nov 7, 2025
Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

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

see comments

Co-authored-by: FabianMeiswinkel <19165014+FabianMeiswinkel@users.noreply.github.com>
@FabianMeiswinkel
Copy link
Member

@copilot I think we can close the PR because no more changes are left?

Copy link
Contributor Author

Copilot AI commented Nov 7, 2025

@copilot I think we can close the PR because no more changes are left?

Yes, all review feedback has been addressed and all changes are complete. The PR is ready to close.

@FabianMeiswinkel
Copy link
Member

No changes left

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