Techniques for implementing systems using transactional version sets are described. Transactional version sets or t-sets include a collection of elements, each having a collection of metadata. A t-set is transactional in that a sequence of updates to one or more t-sets are made within an atomic transaction. A t-set is versioned since each committed transaction that updates it produces a new timestamped version that can be accessed via time-travel queries.
Drawings
Claims19
A computer-implemented method comprising:
receiving, at a transactional access manager within a multi-tenant cloud provider network, a command to begin an atomic transaction involving one or more tables of a data catalog for a data warehouse backed at least in part by an object storage service of the cloud provider network;
generating, based on the command to begin the atomic transaction, a new version node in a version history data structure of a transactional version set corresponding to a table of the data catalog, the version history data structure including at least one other version node corresponding to a previous version of the table, the new version node storing a transaction identifier and an identifier of the other version node, wherein the transactional version set further includes set data structures each being identified by one of the version nodes and each having a collection of elements corresponding to data objects existing in the table;
receiving, at a first server of the transactional access manager, a command to add an element to the transactional version set as part of the transaction, wherein the element comprises metadata associated with a data object stored by the object storage service;
inserting, by the first server based on the command to add the element, the element within a set data structure identified by the new version node in the version history data structure;
receiving, at a second server of the transactional access manager, a command to commit the transaction;
determining, by the second server, that a conflict does not exist for the transaction based at least in part on an analysis of metadata stored by the version history data structure;
generating a commit time for the transaction based on identifying a first commit time of a most recent transaction that wrote to the table and identifying a start time of another most recent transaction that has read data from the table, wherein the generating comprises selecting the commit time to be larger than both the first commit time and the start time;
and
atomically committing the transaction by the second server, wherein the committing includes updating the version history data structure based at least in part on use of the commit time, and wherein the first server and second server are unsynchronized with each other.
6 more elements
A computer-implemented method comprising:
receiving a command to begin an atomic transaction involving a catalog for a table of a data lake as represented by a transactional version set, the transactional version set including a version history data structure storing version nodes that each point to a corresponding set data structure;
generating, based on the receiving of the command to begin the transaction, a new version node in the version history data structure, wherein the new version node includes references to a new set data structure and to a previous version node corresponding to a previous version of the transactional version set;
receiving, at a first server, a command to add an element to the transactional version set as part of the transaction;
inserting, by the first server based on the receiving of the command to add the element, the element within the new set data structure referenced by the new version node;
receiving, at a second server, a command to commit the transaction;
determining, by the second server based on the receiving of the command to commit the transaction, that a conflict does not exist for the transaction based at least in part on an analysis of metadata stored by the version history data structure;
generating a commit time for the transaction based on identifying a first commit time of a most recent transaction that wrote to the transactional version set and identifying a start time of another most recent transaction that has read data from the transactional version set, wherein the generating comprises selecting the commit time to be larger than both the first commit time and the start time;
and
atomically committing the transaction by the second server, wherein the committing includes updating the version history data structure based at least in part on use of the commit time, and wherein the first server and second server are unsynchronized with each other.
6 more elements
A system comprising:
a first one or more electronic devices to implement a storage service in a multi-tenant provider network to store data objects;
and
a second one or more electronic devices to implement a data lake management service in the multi-tenant provider network, the data lake management service including instructions that upon execution cause the data lake management service to:
receive a command to begin an atomic transaction involving a catalog for a table of a data lake as represented by a transactional version set, the transactional version set including a version history data structure storing version nodes that each point to a corresponding set data structure storing references to data objects stored by the storage service;
generate, based on the receipt of the command to begin the transaction, a new version node in the version history data structure, wherein the new version node includes references to a new set data structure and to a previous version node corresponding to a previous version of the transactional version set;
receive, at a first server executed by the second one or more electronic devices, a command to add an element to the transactional version set as part of the transaction;
insert, by the first server based on the receipt of the command to add the element, the element within the new set data structure identified by the new version node;
receive, at a second server executed by the second one or more computing devices, a command to commit the transaction;
determine, by the second server based on the receipt of the command to commit the transaction, that a conflict does not exist for the transaction based at least in part on an analysis of metadata stored by the version history data structure;
generate a commit time for the transaction based on identifying a first commit time of a most recent transaction that wrote to the transactional version set and identifying a start time of another most recent transaction that has read data from the transactional version set, wherein the generation comprises selecting the commit time to be larger than both the first commit time and the start time;
and
atomically commit the transaction by the second server, which is to include updating the version history data structure based at least in part on use of the commit time, and wherein the first server and second server are unsynchronized with each other.
29 Mar 2041Estimated · howhide20 years from earliest known nonprovisional domestic filing plus recorded patent term adjustment. Maintenance-fee lapses, terminal disclaimers and statutory extensions have not been checked. The continuity chain may be incomplete; this is not an enforceability determination.
#Today, many users and organizations build data lakes to break down data silos, centralize data assets, and unlock the potential of their data. Many of these users use data lake management services to simplify data lake setup, security, and management. For example, users may use services that can model their data objects as tables with semi-structured data, centrally define security policies on tables and their columns, and securely analyze the data through a wide variety of analytics and ML services.
#As these users look to leverage data lakes for an increasing variety of purposes, they want granular control over how data is updated and accessed—like they have with data warehouses today. For example, to load streaming data or quickly incorporate changes from source data systems, customers need to insert, delete, and modify rows across multiple tables in parallel. At the same time, to support real-time analytics and ML, they need to run queries that return consistent and up-to-date data. To meet these needs today, users write and maintain complex and error-prone application code to manage concurrent updates and ensure queries return accurate results. Existing systems do not support transactions across multiple tables, have difficulty scaling, and may only work with a narrow set of open-source analytics engines.
#Moreover, many users seek to perform “time travel” based analysis of their data. For example, time travel is increasingly an important part of the data governance and compliance needs for many organizations. Time travel enables accessing historical data as of a specific time, within some defined window. Time travel is typically required to support audits (in case of audits customers often need to run/rerun a report as of a specific time), restoring data (in case of accidental or malicious deletions), backup (to create snapshots/backups for a specific time such as midnight every night), etc.
Brief description of the drawings18 figures
#Various embodiments in accordance with the present disclosure will be described with reference to the drawings, in which:
#FIG. 1 is a diagram illustrating an environment including a transactional access manager of a data lake management system for implementing a governed storage interface providing transactional support for concurrent modifications to objects in a data lake according to some embodiments.
#FIG. 2 is a diagram illustrating exemplary data structures utilized by a transactional access manager for enabling transactional data lake access with time travel capability according to some embodiments.
Detailed description28,725 words
#The present disclosure relates to methods, apparatus, systems, and non-transitory computer-readable storage media for implementing transactional support for data stored in systems such as data lakes. According to some embodiments, a transactional version set can be used to serve as a fundamental abstraction, e.g., for implementing catalog metadata of various types. Data structures following the transactional version set organization can be efficiently stored, provide fast access to requested data, and allow for potentially parallel transactional access to the data with atomicity while ensuring isolation, optionally avoiding the need for locking. The transactional version set, in some embodiments, can be implemented in a hierarchical manner to provide a single representation used for multiple types of catalog entities and operations, simplifying the logic and complexity of a system. In some embodiments, transactional version sets can be used to implement a consistent data catalog, which maintains metadata about the databases, tables, partitions, and files that make up a distributed data management system such as a data lake.
#In some embodiments, transactional version set inspired organizations can be utilized with a protocol for implementing atomic, consistent, isolated, and durable (ACID) transactions that provide snapshot isolation in a distributed setting. Snapshot isolation is commonly used in databases, but most implementations rely on a centralized clock or sequence number generator, which can become a bottleneck in distributed environments. In some embodiments, a protocol and implementation may not require synchronized clocks, e.g., by ensuring at commit time that transactions touching common objects do not commit out of order. In some embodiments, this protocol is implemented in the context of a distributed data lake built on an object storage service in which clients can transactionally add or remove objects from logical tables.
#In some embodiments, an architecture constructed using transactional version set concepts may include the use of tree data structures, such as B-Trees, to maintain a transactionally consistent set with support for time-travel queries. In some embodiments, when a transaction commits, a new version of a tree is created using a copy-on-write based approach that shares internal nodes (with trees corresponding to earlier versions) to save space. In some embodiments, this approach is implemented in a transactional data catalog in which the files that make up a table are stored in a transactional set.