Safe mode and review for Cosmos DB
Every Cosmos DB write is staged, reviewed and checked with If-Match. Production connections ask you to type the container name.
Tablyne does not write to Cosmos DB while you type. Every change is staged first, and the pending-changes bar shows how many there are. When you review them, you see each operation as it will be sent: the method, the path of the document, the partition key and the If-Match value.
The If-Match header carries the _etag the document had when you read it. If the document changed in the meantime, the server refuses the write with a 412. Tablyne marks it as a conflict and writes nothing for that document. The message tells you to discard your edit and work from the current version.
There is no transaction. A batch of operations stops at the first error, and the operations after it are marked “not sent”. If a request is lost after sending, the result is “unknown”, and Tablyne asks you to reload to find out. It never repeats an unknown write by itself.
Edits in the grid need the partition key paths and _etag in the result. If your query projects only some fields, Tablyne tells you to include them or to use a point read.
Connections marked as production add a step. Before writing documents, creating a container or importing a file, you type a name to confirm. Deleting a container always asks you to type its name. Changing a container setting asks for the name too, and shows the cost change when throughput is involved.
A read-only connection turns off creating, editing and deleting, and Tablyne labels the cause. The read-only option is an app safeguard. For a hard limit, use the account’s read-only key.
Other costs are shown before you agree: the estimated monthly cost of a new container, a warning when a TTL will delete documents for good, and a warning when an index change will cost RU.