The document discusses MongoDB transactions and concurrency. It provides code examples of how to perform transactions in MongoDB using logical sessions, including inserting a document into a collection and updating related documents in another collection atomically. It also discusses some of the features and timeline for implementing distributed transactions in sharded MongoDB clusters.
9. Marathon to transactions: the homestretch
MongoDB 3.0 MongoDB 3.2 MongoDB 3.4 MongoDB 3.6 MongoDB 4.0
Single Replica Set
Transactions
MongoDB 4.2
Sharded
Transactions
New Storage engine
(WiredTiger)
Enhanced replication
protocol: stricter
consistency & durability
Shard membership
awareness
Consistent secondary
reads in sharded clusters
Storage support for
prepared transactions
Transaction – compatible
chunk migration
WiredTiger default storage
engine
Logical sessions
Make catalog
timestamp-aware
More extensive
Wired Tiger repair
Config server
manageability
improvements
Retryable writes
Replica set
point-in-time reads
Transaction manager
Read concern "majority" Causal Consistency
Recoverable rollback via
WT checkpoints
Global point-in-time reads
Cluster-wide logical clock Recover to a timestamp
Oplog applier prepare
support for transactions
Storage API to changes to
use timestamps
Sharded catalog
improvements
Collection catalog
versioning
Make collection
drops two phrase
UUIDs in sharding
Fast in-place updates to
large documents in WT
In Progress
Done
Sharded Transaction Feature
111. final Barcode barcode =
data.getParcelableExtra(BarcodeActivity.BARCODE_FIELD);
final Document query = new Document("barcodeId",
barcode.displayValue);
final Document update = new Document("$inc",
new Document("itemsScanned", 1));
final Document after = itemsColl.findOneAndUpdate(
query,
update,
new FindOneAndUpdateOptions().
upsert(true).
returnDocument(ReturnDocument.AFTER));
112. final Barcode barcode =
data.getParcelableExtra(BarcodeActivity.BARCODE_FIELD);
final Document query = new Document("barcodeId",
barcode.displayValue);
final Document update = new Document("$inc",
new Document("itemsScanned", 1));
final Document after = itemsColl.findOneAndUpdate(
query,
update,
new FindOneAndUpdateOptions().
upsert(true).
returnDocument(ReturnDocument.AFTER));
125. Innovation Award Winners
Global Go-to-Market
Partner of the Year The Enterprise Launch Fast Scale
Data-Driven Business Customer Experience Healthcare Internet of Things
Delivery Partner of the Year
The William Zola Award for
Community Excellence Atlas Savvy Startup
Notes de l'éditeur
Best way to work with data
This is the first of three ____ that make MDB the best database platform for most applications.
Aggregation
Create stage-by-stage
See documents each time
Create stage-by-stage
See documents each time
Create stage-by-stage
See documents each time
Create stage-by-stage
See documents each time
Create stage-by-stage
See documents each time
AVAILABLE TODAY
The agg framework is really powerful, but in some cases its hard to get access to it, like in a web browser.
beta last year
beta last year
beta last year
beta last year
beta last year
beta last year
So now that you’ve great stuff in your database, you also want to get additional business value from thata data.
The heart of analytics in MDB is the agg pipeline, but people/analsyts want a more "bueinessy" tool
WHAT BI FEATURES – AVAILABLE NOWODBC! I can connect e xceltto atlas in minutes – AVAILBLE NOW
Charts
New in Working with Data
So documents are the 1st pillar, disctribuets sytems are the second
Control over where your data goes
Why distribuetd db: Async Streaming, Services, Cloud, Globally distribuetd
Geo distribution
1) Ny 2) add +emea 3) +australia
This is suoer powerful, impossiblr with any other tool on the planet, but stt a lot to manage
Wouldn’t it be nic….
1) Ny 2) add +emea 3) +australia
This is suoer powerful, impossiblr with any other tool on the planet, but stt a lot to manage
Wouldn’t it be nic….
1) Ny 2) add +emea 3) +australia
This is suoer powerful, impossiblr with any other tool on the planet, but stt a lot to manage
Wouldn’t it be nic….
This is possible with zoned sharding, super powerful… but a burden to maintain
This is possible with zoned sharding, super powerful… but a burden to maintain
THINK HOW HARD BEFORE
Atlas global writes clusters are availabele right now.
In 3.6, we added chang streams