Skip to content

Define DocumentDB-specific specs for engine-dependent features #160

@eerxuan

Description

@eerxuan

Problem

The functional test repo currently validates behavior against MongoDB by default, since DocumentDB doesn't have official specs for all features yet. Most features aim for compatibility, but several features are inherently engine-specific and produce different output. These need DocumentDB-specific specs.

Running the $collStats tests (PR #144) against DocumentDB (open-source, via Docker) shows 178/252 failures — not because of bugs, but because the output structure differs.

Engine-Specific Features Needing DocumentDB Specs

$collStats (PR #144)

  • host and localTime fields: present in MongoDB, absent in DocumentDB
  • storageStats.capped: present in MongoDB, absent in DocumentDB
  • storageStats.wiredTiger: MongoDB-specific storage engine details
  • latencyStats: works in MongoDB, returns error 115 in DocumentDB
  • queryExecStats: works in MongoDB, returns error 115 in DocumentDB
  • null sub-option handling: MongoDB treats as "omitted", DocumentDB rejects with type error

$indexStats

  • Output fields (host, accesses, shard) likely differ
  • Needs verification against DocumentDB

explain plans

  • Query plan stages (IXSCAN, COLLSCAN, etc.) are engine-specific
  • Execution stats fields differ
  • Index usage reporting differs

$currentOp

  • Operation details are engine-specific
  • Connection/lock information differs

$planCacheStats

  • Plan cache implementation is engine-specific

What's Needed

For each feature above:

  1. Run tests against DocumentDB to capture current behavior
  2. Engine team confirms for each divergence: intentional behavior, not yet implemented, or bug
  3. Define the DocumentDB spec based on confirmed intended behavior
  4. Update tests with engine-specific expectations for confirmed divergences

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions