Skip to content

fix: mongo collecction with indexes max time - #303

Merged
franklinkim merged 2 commits into
mainfrom
fix/mongo-collecction-with-indexes-max-time
Aug 7, 2026
Merged

fix: mongo collecction with indexes max time#303
franklinkim merged 2 commits into
mainfrom
fix/mongo-collecction-with-indexes-max-time

Conversation

@franklinkim

Copy link
Copy Markdown
Member

Description

Reimplement CollectionWithIndexesMaxTime with a context timeout (mongo-driver v2 dropped MaxTime) and fix mistakenly renamed CollectionWith* option functions.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📝 Documentation
  • ♻️ Refactoring
  • 🏃‍➡️ Performance
  • ✅ Tests
  • 🔐 Security
  • 🔧 Build/CI

Changes

  • CollectionWithIndexesMaxTime no longer no-op; wraps index creation in a context.WithTimeout using the given duration.
  • Replaced IndexesContext field with IndexesMaxTime time.Duration on CollectionOptions.
  • Renamed mistyped option funcs to match what they actually set: CollectionWithIndexesContextCollectionWithCommitQuorumInt, CollectionWithIndexesQuorumMajorityCollectionWithCommitQuorumMajority, CollectionWithIndexesCommitQuorumStringCollectionWithCommitQuorumString, CollectionWithIndexesCommitQuorumVotingMembersCollectionWithCommitQuorumVotingMembers.

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.

@franklinkim
franklinkim merged commit ddb9da2 into main Aug 7, 2026
4 checks passed
@franklinkim
franklinkim deleted the fix/mongo-collecction-with-indexes-max-time branch August 7, 2026 08:41
@franklinkim franklinkim changed the title Fix/mongo collecction with indexes max time fix: mongo collecction with indexes max time Aug 7, 2026
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.

1 participant