mongodb config_error ai_generated true

MongoServerError: time series granularity cannot be changed

ID: mongodb/time-series-granularity

Also available as: JSON · Markdown
80%Fix Rate
84%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
7 active

Root Cause

Time series collection granularity is immutable after creation.

generic

Workarounds

  1. 90% success Plan granularity before creating collection: seconds, minutes, or hours
  2. 85% success Create new collection with correct granularity and migrate data

Dead Ends

Common approaches that don't work:

  1. Drop and recreate collection 85% fail

    Loses all time series data

  2. Ignore granularity mismatch 72% fail

    Suboptimal bucket packing