Project

General

Profile

Actions

Rados - multi-object transaction support » History » Revision 7

« Previous | Revision 7/25 (diff) | Next »
Li Wang, 06/15/2015 11:06 AM


Multi-object transaction support

Summary
This is for multi-object transaction support.

Owners

Li Wang (Ubuntukylin)
Yunchuan Wen (Ubuntukylin)
Name

Interested Parties
If you are interested in contributing to this blueprint, or want to be a "speaker" during the Summit session, list your name here.
Name (Affiliation)
Name (Affiliation)
Name

Current Status
Please describe the current status of Ceph as it relates to this blueprint. Is there something that this replaces? Are there current features that are related?

Detailed Description
(1) Allow client to define the following struct,
struct MultiObjectTransaction {
map<hobject_t, ObjectWriteOperation> object_ops;
hobject_t master;
};
based on this, client could send a group of ops through MOSDOp to the PG coressponding to master object, call it MASTER

(2) Master receive MOSDOp from client, extract ObjectWriteOperations by PGs, and send them to corresponding PGs, call them SLAVE

(3) SLAVE receive MOSDOp from MASTER, if there are pending conventional single-object transactions with operations on the same object, wait until them finished; If there are pending multi-object transactions with the operations on the same object, return EAGAIN (we can not wait here, otherwise may dead lock, see http://article.gmane.org/gmane.comp.file-systems.ceph.devel/23783); Otherwise, contruct the transaction in the conventional way, return MASTER PG PREPARE_ACK, if error occured, for example, a 'read-then-comparation' failed, return MASTER error

(4) If MASTER receive error from SLAVE, it send ROLLBACK to all SLAVES, cancel the transaction, return client error

(5) MASTER collect all PREPARE_ACK, send SLAVES PREPARE_COMMIT

(6) SLAVE receive PREPARE_COMMIT from MASTER, write pending transaction into PG metadata, return MASTER PREPARE_COMMIT_ACK

(7) MASTER collect all PREPARE_COMMIT_ACK, construct a transaction, including a write to PG metadata to indicat the transaction COMMITTING, and the writes operations on its own data objects, submit the transaction to ObjectStore, then return client ACK, enable client to return from write operation, and send SLAVES COMMIT

(8) SLAVE receive COMMIT, submit the pending transaction to ObjectStore, after the transaction finished (written to the real objects), delete the transaction from PG metadata, return MASTER COMMIT_ACK

(9) MASTER collect COMMIT_ACK, return client COMMIT, to indicate the transaction has been really finished, enable client to do read, delete the transaction from the PG metadata

Work items
This section should contain a list of work tasks created by this blueprint. Please include engineering tasks as well as related build/release and documentation work. If this blueprint requires cleanup of deprecated features, please list those tasks as well.

Coding tasks
Task 1
Task 2
Task 3

Build / release tasks
Task 1
Task 2
Task 3

Documentation tasks
Task 1
Task 2
Task 3

Deprecation tasks
Task 1
Task 2
Task 3

Updated by Li Wang almost 9 years ago · 7 revisions