Skip to content

feat(transaction): Transaction Savepoints CI + v1.8.0 CHANGELOG (roadmap #232) - #4276

Merged
makr-code merged 2 commits into
developfrom
copilot/transaction-savepoints-implementation
Mar 15, 2026
Merged

makr-code merged 2 commits into
developfrom
copilot/transaction-savepoints-implementation

Conversation

Copilot AI commented Mar 15, 2026 •

Copy link
Copy Markdown
Contributor

Named savepoint support (createSavepoint / rollbackToSavepoint / releaseSavepoint) with RocksDB backing and SAGA step trimming was already fully implemented in TransactionManager::Transaction. This PR completes the v1.8.0 delivery by adding the missing CI pipeline and CHANGELOG entry.

Description

What was missing:

  • No CI workflow to gate savepoint regressions on the transaction_manager sources
  • No CHANGELOG.md v1.8.0 entry for the named savepoint feature

Changes:

  • .github/workflows/transaction-savepoints-ci.yml — triggers on changes to transaction_manager.h, transaction_manager.cpp, test_savepoints.cpp, and related CMake files; builds the test_savepoints target; runs TransactionSavepointTests across gcc-12/ubuntu-22.04, clang-15/ubuntu-22.04, gcc-13/ubuntu-24.04; uploads artifacts and writes a step summary
  • src/transaction/CHANGELOG.md — v1.8.0 entry documenting named savepoints, SAGA step trimming, LIFO stack ordering, and automatic cleanup on rollback/release

Audit result (all 12 ACs verified ✅):

  • createSavepoint / rollbackToSavepoint / releaseSavepoint backed by SetSavePoint / RollbackToSavePoint / PopSavePoint
  • savepoints_ vector with SavepointEntry{name, saga_step_count} tracks order; saga_->trimToSize() called on rollback
  • Exception-safe: reserve() before setSavePoint() to prevent RocksDB stack/bookkeeping divergence on OOM
  • 20 tests in test_savepoints.cpp, 3 benchmarks in bench_transaction_throughput.cpp

Type of Change

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • Other: CI workflow

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

📚 Research & Knowledge (wenn applicable)

  • Diese PR basiert auf wissenschaftlichen Paper(s) oder Best Practices?
    • Falls JA: Research-Dateien in /docs/research/ angelegt?
    • Falls JA: Im Modul-README unter "Wissenschaftliche Grundlagen" verlinkt?
    • Falls JA: In /docs/research/implementation_influence/ eingetragen?

Relevante Quellen:

  • Paper:
  • Best Practice:
  • Architecture Decision:

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Documentation updated (if needed)
  • No new warnings introduced
Original prompt

This section details on the original issue you should resolve

<issue_title>Transaction Savepoints</issue_title>
<issue_description>### Context

This issue implements the roadmap item 'Transaction Savepoints' for the transaction domain. It is sourced from the consolidated roadmap under 🟡 Medium Priority — Mid-term (v1.9.0 – v2.0.0) and targets milestone v1.8.0.

Primary detail section: Transaction Savepoints

Goal

Deliver the scoped changes for Transaction Savepoints in src/transaction/ and complete the linked detail section in a release-ready state for v1.8.0.

Detailed Scope

Transaction Savepoints

Status: ✅ Implemented (v1.x)
Priority: Medium
Target Version: v1.8.0

Named savepoint support with partial rollback is fully implemented in TransactionManager::Transaction.

Implemented Features:

  • Named savepoints within transaction (createSavepoint, rollbackToSavepoint, releaseSavepoint)
  • Rollback to savepoint — undoes writes without aborting the full transaction
  • Automatic savepoint cleanup on rollback/release
  • Savepoint stacking with correct LIFO ordering
  • SAGA step trimming — compensating actions added after a savepoint are discarded on rollback

Architecture:

class Transaction {
public:
    // Savepoint API — implemented in transaction_manager.h
    Status createSavepoint(std::string_view name);
    Status rollbackToSavepoint(std::string_view name);
    Status releaseSavepoint(std::string_view name);
    
    // Query savepoints
    std::vector<std::string> getSavepoints() const;
    bool hasSavepoint(std::string_view name) const;
};

// Example usage
auto txn = txn_mgr.begin();

txn.putEntity("users", user1);
txn.createSavepoint("after_user1");

txn.putEntity("users", user2);
txn.createSavepoint("after_user2");

txn.putEntity("users", user3);

// Oops, user3 was invalid - rollback to after_user2
txn.rollbackToSavepoint("after_user2");

// user1 and user2 still in transaction, user3 discarded
txn.commit();

Use Cases:

  • Complex multi-step operations
  • Error recovery within transaction
  • Conditional processing
  • Nested logic with partial rollback

Implementation:

  • Backed by RocksDB SetSavePoint / RollbackToSavePoint / PopSavePoint
  • savepoints_ vector in Transaction tracks named entries in creation order
  • SAGA trimToSize removes compensating actions added after the rollback point

Acceptance Criteria

  • Named savepoints within transaction (createSavepoint, rollbackToSavepoint, releaseSavepoint)
  • Rollback to savepoint — undoes writes without aborting the full transaction
  • Automatic savepoint cleanup on rollback/release
  • Savepoint stacking with correct LIFO ordering
  • SAGA step trimming — compensating actions added after a savepoint are discarded on rollback
  • Complex multi-step operations
  • Error recovery within transaction
  • Conditional processing
  • Nested logic with partial rollback
  • Backed by RocksDB SetSavePoint / RollbackToSavePoint / PopSavePoint
  • savepoints_ vector in Transaction tracks named entries in creation order
  • SAGA trimToSize removes compensating actions added after the rollback point

Relationships

References

  • src/ROADMAP.md
  • src/transaction/FUTURE_ENHANCEMENTS.md#transaction-savepoints
  • Source key: roadmap:232:transaction:v1.8.0:transaction-savepoints

Generated from the consolidated source roadmap. Keep the roadmap and issue in sync when scope changes.

</issue_description>

Comments on the Issue (you are @copilot in this section)


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI changed the title [WIP] Implement transaction savepoints for v1.8.0 feat(transaction): Transaction Savepoints CI and CHANGELOG for v1.8.0 Mar 15, 2026
Copilot AI requested a review from makr-code March 15, 2026 19:07
Copilot AI changed the title feat(transaction): Transaction Savepoints CI and CHANGELOG for v1.8.0 feat(transaction): Transaction Savepoints CI + v1.8.0 CHANGELOG (roadmap #232) Mar 15, 2026
@makr-code
makr-code marked this pull request as ready for review March 15, 2026 19:16
@makr-code
makr-code merged commit 8602d59 into develop Mar 15, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transaction Savepoints

2 participants