Skip to content

SERVER-129760: Repeatedly creating and dropping the same TTL index ca… - #1818

Open
ycycyyc wants to merge 1 commit into
mongodb:masterfrom
ycycyyc:yc-fix-SERVER-129760
Open

SERVER-129760: Repeatedly creating and dropping the same TTL index ca…#1818
ycycyyc wants to merge 1 commit into
mongodb:masterfrom
ycycyyc:yc-fix-SERVER-129760

Conversation

@ycycyyc

@ycycyyc ycycyyc commented Jun 24, 2026

Copy link
Copy Markdown

@AlexTalks
AlexTalks self-requested a review July 14, 2026 21:37

@AlexTalks AlexTalks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This generally makes sense, though I have a minor change request.

_deregisterTTLInfo_inlock(uuid, info);
}

void TTLCollectionCache::_deregisterTTLInfo_inlock(UUID uuid, const Info& info) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Generally, we'd use the WithLock utility for something like this. So it would look like _deregisterTTLInfo(WithLock, UUID uuid, const Info& info).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks, that makes sense.

@ycycyyc
ycycyyc force-pushed the yc-fix-SERVER-129760 branch from 5321180 to 3fbde8c Compare August 21, 2026 01:21
void TTLCollectionCache::_deregisterTTLInfo(WithLock, const UUID& uuid, const Info& info) {
auto infoIt = _ttlInfos.find(uuid);
if (infoIt == _ttlInfos.end()) {
LOGV2_DEBUG(9150100,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, one thing I didn't notice earlier is that on each first registration of TTL info, we'll emit this log message. Can we change this so that we don't have this log message emitted on each initial registration? (Potentially with a flag I suppose)

auto infoInvalid = TTLCollectionCache::Info{
"collA_ttl_1", TTLCollectionCache::Info::ExpireAfterSecondsType::kInvalid};
auto infoInt = TTLCollectionCache::Info{
"collA_ttl_1", TTLCollectionCache::Info::ExpireAfterSecondsType::kInt};

@AlexTalks AlexTalks Aug 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Make sure to run bazel run lint and bazel run format, it seems like this may be failing linting rules.

…uses the TTL job to run multiple times within a single cycle
@ycycyyc
ycycyyc force-pushed the yc-fix-SERVER-129760 branch from 3fbde8c to 1a7cfac Compare September 3, 2026 03:36
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