Netflix / iceberg

Iceberg is a table format for large, slow-moving tabular data
Apache License 2.0
476 stars 59 forks source link

Add single table transactions. #52

Closed rdblue closed 6 years ago

rdblue commented 6 years ago

This adds a Transaction API that exposes some Table updates that can be performed in a single commit.

The transaction works by replacing the underlying TableOperations passed to individual updates with a transaction version that applies changes to the table metadata result of the previous update. If the transaction commit needs to retry, it re-runs commit for each update in order. Each update must be committed before the next update is created to ensure a clear order.

Transaction also returns a table, which can be passed to code that expects a Table instead of a Transaction. Operations on that table become part of the transaction.

rdblue commented 6 years ago

@Parth-Brahmbhatt, @danielcweeks, could you review this PR?