-
Notifications
You must be signed in to change notification settings - Fork 82
doc: Add a design document for the transaction framework #1003
Conversation
This document contains the design for the proposed update to the transaction framework to make it more reliable and distributed. Closes gluster#919
Use the rich-diff view to get the rendered document. Or view the document directly |
I finally sat down and found time to read through the doc. This is really good! Here's a couple thoughts that occurred to me as I worked my way through the doc:
All all in this jives with a lot of thinks I was thinking before I read it so I can only think this is heading in a great direction! :-) |
All peers that are involved in the transaction are checked if they're online. This is just to ensure that the transaction has a possibility of success when we launch it. The initiator needs to know that the peers involved are connected to the store. This check already exists and isn't something new that we need to do.
Transactions always need to know where they need to run. The transaction itself and the transaction framework are not intelligent, and cannot decide where it needs to run. It's the upper layer callers into the transaction framework, who have the intelligence and would craft a transaction that does actions they want. So, for the "device replace" case, the API handler for the request would identify the new devices and nodes, and prepare a transaction with that information. The transaction framework would then execute the transaction.
I'd need a little more time to think about the actual internal structures that would be implemented. I'll try to what is possible to this document.
The timers are all local, Go timers started by each peer. They are not provided by etcd. We would most likely use timeout contexts for transaction timer. The cleanup timer is just a periodic timer, that would call the cleanup function every X time-period. To help the cleanup function, we would also need to add a I'll clarify this in the document.
Yes. This would be correct. It would be sort of similar to the transaction leader going offline. Any held global locks would be lost, so any transactions in progress cannot be resumed. All of them will need to be cleaned-up. |
I'm not 100% sold on this and I'll try to explain why. Please feel free to try and convince me it is not an issue. :-)
Could etcd provide a way to help with this? I worry about timestamps in distributed systems because of clock skew issues. |
I still see this being possibly be done with the proposed framework. But I may not be seeing it as you see it. We should work together and write down the workflow for this. It'll help us understand if the same can be reasonably done with the framework or if we need more changes like the transactions spawning transactions below.
We could possibly do this, or something that provides this desired effect. |
Not as far as I know. Etcd provides revisions, but not any sort of timestamps. |
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 Signed-off-by: Oshank Kumar <okumar@redhat.com> transaction: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction.
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 transaction: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 transaction: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
@kshlm @oshankkumar can we please get the agreed upon pieces of the design what we're implementing as part of #1268 ? This PR is open for long time now and we should get this to the closure. |
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document gluster#1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
The transaction engine executes the given transaction across the cluster.The engine is designed to make use of etcd as the means of communication between peers. Please refer Design Document #1003 cleanup leader: added a cleanup leader which will perform all cleaning operation. A leader is elected among the peers in the cluster to cleanup stale transactions. The leader periodically scans the pending transaction namespace for failed and stale transactions, and cleans them up if rollback is completed by all peers involved in the transaction. Signed-off-by: Oshank Kumar <okumar@redhat.com>
TODO:
Closes #919