is a lightweight command-line utility and library that orchestrates two-phase commit (2PC) protocols across distributed resources (databases, message queues, or custom transactional systems). It ensures atomicity in environments where multiple independent services must either all commit or all abort a transaction.
While the specific term "get2pc" is often used as a shorthand or misspelling of , it typically refers to a popular website known for providing free downloads of software, ranging from operating systems like Windows to high-end creative suites like Adobe Photoshop and AutoCAD.
get2pc start --txid transfer-123 get2pc add --txid transfer-123 --participant pg://accounts/a \ --prepare "UPDATE accounts SET balance=balance-100 WHERE id='a' AND balance>=100" \ --commit "UPDATE accounts SET balance=balance-100 WHERE id='a'" \ --abort "NO-OP" get2pc add --txid transfer-123 --participant mysql://accounts/b \ --prepare "UPDATE accounts SET balance=balance+100 WHERE id='b'" \ --commit "UPDATE accounts SET balance=balance+100 WHERE id='b'" \ --abort "NO-OP" get2pc commit --txid transfer-123