26#include "iceberg/iceberg_export.h"
27#include "iceberg/result.h"
39 static Result<std::shared_ptr<SetSnapshot>> Make(
40 std::shared_ptr<TransactionContext> ctx);
45 SetSnapshot& SetCurrentSnapshot(int64_t snapshot_id);
53 Kind
kind() const final {
return Kind::kSetSnapshot; }
57 Result<int64_t> Apply();
60 explicit SetSnapshot(std::shared_ptr<TransactionContext> ctx);
66 Result<std::optional<int64_t>> FindLatestAncestorOlderThan(int64_t timestamp_ms)
const;
68 std::optional<int64_t> target_snapshot_id_;
69 bool is_rollback_{
false};
Base class for all kinds of table metadata updates.
Definition pending_update.h:41
Sets the current snapshot directly or by rolling back.
Definition set_snapshot.h:37
Kind kind() const final
Return the kind of this pending update.
Definition set_snapshot.h:53
bool IsRetryable() const override
Whether this update can be retried after a commit conflict.
Definition set_snapshot.h:54