What changes compared with MongoDB

The differences you will notice most when moving from MongoDB to TeselaDB, nearly all of them stronger guarantees.

TeselaDB

TeselaDB

TeselaDB team

2 min read

  • MongoDB
  • compatibility
  • migration

TeselaDB implements the MongoDB 9.0 protocol, and the compatibility suite compares its answers with those of a real MongoDB server. Even so, some behaviours change. Nearly all are stronger guarantees; a few ask you to review your code.

Stronger guarantees

  • A search with $search sees every write confirmed before it starts. You do not have to wait for the index to catch up.
  • _id is unique across the cluster. A unique index is too, without the shard key as a prefix.
  • local and available reads always return data confirmed by a majority.
  • Search scores use the statistics of the whole collection and are the same on every replica.

What you have to review

  • A find without sort returns the documents in the order of their key. If your application depends on another order, add sort.
  • What MongoDB marks as deprecated in version 9.0 does not exist, such as $substr or filemd5. Replace each use with its successor. Deprecated features the drivers and mongosh still send, such as isMaster, are kept.
  • A key that always grows, such as an ObjectId or a creation date, piles the writes onto the last range. In collections with heavy traffic, use another key or an index with teselaBuckets.

What is added

Each node also serves a REST API with OpenAPI and an MCP server for agents. There are also cluster parameters of its own, such as teselaHistoryRetention, which sets how much history is kept. None of this changes the MongoDB protocol, so you only use it if it suits you.

The full list, with what to do in each case, is in Differences with MongoDB, and the status of each command and of each operator or stage, in Compatibility.

All posts