Skip to content

Add code design rules for AI - #2028

Open
stIncMale wants to merge 2 commits into
mongodb:backpressurefrom
stIncMale:codeDesignRulesForAI
Open

Add code design rules for AI#2028
stIncMale wants to merge 2 commits into
mongodb:backpressurefrom
stIncMale:codeDesignRulesForAI

Conversation

@stIncMale

@stIncMale stIncMale commented Jul 31, 2026

Copy link
Copy Markdown
Member

Part of JAVA-6240, as discussed in stIncMale#3 (comment).

This change was reviewed using Claude. Claude was also used to explain what the change should look like.

@stIncMale
stIncMale force-pushed the codeDesignRulesForAI branch from cf87f28 to 9a60a44 Compare August 18, 2026 22:33
@stIncMale
stIncMale changed the base branch from main to backpressure August 18, 2026 22:33
@stIncMale
stIncMale requested a review from vbabanin August 18, 2026 22:34
@stIncMale
stIncMale marked this pull request as ready for review August 18, 2026 22:38
@stIncMale
stIncMale requested a review from a team as a code owner August 18, 2026 22:38
@codeowners-service-app

codeowners-service-app Bot commented Aug 18, 2026

Copy link
Copy Markdown

Assigned strogiyotec for team dbx-java because vbabanin is out of office.
Assigned strogiyotec for team dbx-java because vbabanin is out of office.

@stIncMale
stIncMale removed the request for review from strogiyotec August 18, 2026 23:12
@stIncMale

Copy link
Copy Markdown
Member Author

@strogiyotec, please ignore the review request. The bot is too stupid and insists on its choice even after having been manually overridden.

@vbabanin
vbabanin removed the request for review from strogiyotec August 19, 2026 16:32
It should be created and managed either by `CommonExecutor`, `AsyncClientExecutor`,
or a class whose instance is accessible via them. This may require changing their design, implementation, documentation.
- When instantiating an executor, prefer the `MongoThreadPoolExecutor` and `MongoScheduledThreadPoolExecutor` implementations.
- Use daemon threads, see `DaemonThreadFactory`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we make this a MUST? We only spawn daemon threads, and I don’t foresee us using non-daemon threads.

Suggested change
- Use daemon threads, see `DaemonThreadFactory`.
- Must use daemon threads, see `DaemonThreadFactory`.

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