Maintaining transactional consistency in column engine

By loading fully visible data in the column cache and refreshing asynchronously, only one version is maintained, the problem of data failure block accumulation in the column cache is solved, memory savings and query performance are improved, and transaction consistency is ensured.

CN118922825AActive Publication Date: 2024-11-08GOOGLE LLC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202380029874.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-09-23
Filing Date
2023-04-07
Publication Date
2024-11-08
Estimated Expiration
2043-04-07

AI Technical Summary

Technical Problem

When using columnar cache, it is difficult to maintain transaction consistency, resulting in data failure block accumulation, affecting query performance and memory usage efficiency.

Method used

By loading fully visible data in the column cache, the corresponding data is invalidated as data is modified, and the latest data is refreshed asynchronously, only one version is maintained at the block level, querying uses valid blocks, asynchronously prefetching invalid blocks from row storage, reducing Metadata quantity, realize block-level failure and refresh.

Benefits of technology

It significantly reduces the memory usage of columnar cache, improves query performance, simplifies metadata management, and ensures transaction consistency and query efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118922825A_ABST
    Figure CN118922825A_ABST
Patent Text Reader

Abstract

Aspects of the present disclosure relate to maintaining transactional coherency when using a columnar cache. The column cache may be initially loaded with fully visible data, and when the data is modified, the corresponding data fails in the column cache. As more data becomes invalid in the column cache, the corresponding data may be refreshed in the column cache. As part of the refresh, the most recent all-visible data may be populated while the query is still using old data in the columnar cache. When all queries transition to data using new padding, old data may be removed from the columnar cache. Queries may use valid blocks of a columnar cache and turn to row storage for invalid blocks. When a query begins to use a columnar cache, a request may be submitted to asynchronously prefetch invalid blocks from a row store.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is a continuation of U.S. patent application No. 17 / 951,193 filed on September 23, 2022, which claims the benefit of the filing date of U.S. Provisional Patent Application No. 63 / 339,601 filed on May 9, 2022, and the disclosures of the U.S. patent application and the U.S. Provisional Patent Application are hereby incorporated herein by reference. Background Art

[0003] A database management system (DBMS) is a system for managing one or more databases and for receiving and resolving queries to the managed databases. A DBMS can manage one or more data tables or relations stored on one or more storage devices and forming part of one or more managed databases. A DBMS can read and write to individual rows or columns of the managed tables, including updating, deleting, and adding records.

[0004] A DBMS may implement a cache for temporarily storing database data. A cache may store blocks of data representing rows of a base database table. Data in a cache may be stored in a column-major format or a row-major format. Elements of a table stored in a column-major format are stored contiguously in memory by column, while elements of a table stored in a row-major format are stored contiguously in memory by row. A cached block is invalidated when the corresponding block of the base table from which the cached block was retrieved is modified after the cached block was cached. The invalidated block no longer reflects data updated from the base table from which the data was cached.

[0005] A database cache in which data is stored in a column-major format is a columnar cache. A columnar cache can efficiently serve analytical queries by caching a subset of tables / columns in memory in a column-major format. A columnar cache may be particularly suitable for databases that persist tables in a row-major format. A columnar cache may improve performance by accessing only relevant columns with better compression support and using vectorized execution. A columnar cache may store data in terms of table fragments, which are virtual horizontal partitions of row-major data. Several consecutive blocks of rows are converted to a column-major format, resulting in independent and self-describing table fragments. Within a table fragment, all values ​​of a column are physically stored together to enable faster predicate filtering and aggregation.

[0006] Multi-version concurrency control (MVCC) creates a new version of a data item for each write. With MVCC in a DBMS, each Structured Query Language (SQL) statement sees a snapshot of the data (e.g., a database version) as it was some time ago, regardless of the current state of the underlying data. This prevents statements from viewing inconsistent data generated by concurrent transactions that perform updates on the same data row, thereby providing transaction isolation for each database session. MVCC minimizes lock contention by avoiding the locking methods of traditional DBMSs to achieve reasonable performance in a multi-user environment. The main advantage of using the MVCC model of concurrency control rather than locking is that in MVCC, locks acquired for querying (e.g., reading) data do not conflict with locks acquired for writing data, and therefore reads never block writes, and writes never block reads.

[0007] When a columnar cache is added to a DBMS, data is cached in a columnar format in the columnar cache. Since the data is modified concurrently, transactions that perform columnar cache reads need to see transactionally consistent data and thus comply with the isolation level of that transaction. Summary of the invention

[0008] Various aspects of the present disclosure relate to maintaining transaction consistency when using a column cache. At any point in time, the column cache may contain only data visible to all ongoing transactions in a database system. The column cache may be initially loaded with fully visible data, and when the data is modified, the corresponding data is invalidated in the column cache. As more data becomes invalid due to modifications performed by users after the initial load, the corresponding data may be refreshed in the column cache. As part of the refresh, the latest fully visible data may be populated while the query is still using the old data in the column cache. When all queries are converted to use the newly populated data, the old data may be removed from the column cache. Invalidation may be performed at the block level of the column cache. If a block is valid in the column cache, the block may contain only fully visible data. Queries may use valid blocks of the column cache and go to the row store for invalid blocks. When a query begins to use the column cache, a request may be submitted to asynchronously prefetch invalid blocks from the row store.

[0009] One aspect of the present disclosure provides a method for maintaining transaction consistency when retrieving data from a column cache. The method includes: loading a first plurality of blocks corresponding to data into the column cache using one or more processors; invalidating the one or more blocks using one or more processors when the data corresponding to one or more blocks in the first plurality of blocks is modified in a corresponding row store; and refreshing the column cache using a second plurality of blocks corresponding to the modified data to replace the invalidated blocks using one or more processors.

[0010] In one example, the first plurality of blocks includes valid blocks corresponding to all visible data. In another example, the method further includes: performing, using one or more processors, a row store operation to retrieve data for the failed block. In yet another example, the method further includes: pre-fetching the modified data from the row store using one or more processors.

[0011] In yet another example, the method further includes: determining, using one or more processors, to refresh the column cache based on the effectiveness of the column cache. In yet another example, the effectiveness of the column cache is based on whether the column cache is consistently not selected for retrieving data for a predetermined number of times. In yet another example, the column cache is not selected based on a number of failed blocks in the column cache.

[0012] Another aspect of the present disclosure provides a system, the system comprising: one or more processors; and one or more storage devices, the one or more storage devices coupled to the one or more processors and storing instructions, the instructions when executed by the one or more processors, causing the one or more processors to perform operations for maintaining transaction consistency when retrieving data from a column cache. The operations include: loading a first plurality of blocks corresponding to data into the column cache; invalidating the one or more blocks when data corresponding to one or more blocks in the first plurality of blocks is modified in a corresponding row store; and refreshing the column cache with a second plurality of blocks corresponding to the modified data to replace the invalidated blocks.

[0013] In one example, the first plurality of blocks includes valid blocks corresponding to all visible data. In another example, the operations further include: performing a row store operation to retrieve a failed block for the data. In yet another example, the operations further include: pre-fetching the modified data from the row store.

[0014] In yet another example, the operations further include: determining to refresh the column cache based on the effectiveness of the column cache. In yet another example, the effectiveness of the column cache is based on whether the column cache is consistently not selected for retrieving data for a predetermined number of times. In yet another example, the column cache is not selected based on a number of failed blocks in the column cache.

[0015] Yet another aspect of the present disclosure provides a non-transitory computer-readable medium for storing instructions, which when executed by one or more processors causes the one or more processors to perform operations for maintaining transactional consistency when retrieving data from a column cache. The operations include: loading a first plurality of blocks corresponding to data into the column cache; invalidating the one or more blocks when data corresponding to one or more blocks in the first plurality of blocks is modified in a corresponding row store; and refreshing the column cache with a second plurality of blocks corresponding to the modified data to replace the invalidated blocks.

[0016] In one example, the first plurality of blocks includes valid blocks corresponding to all visible data. In another example, the operations further include: performing a row store operation to retrieve a failed block for the data. In yet another example, the operations further include: pre-fetching the modified data from the row store.

[0017] In yet another example, the operations further include: determining to refresh the column cache based on the effectiveness of the column cache. In yet another example, the effectiveness of the column cache is based on whether the column cache is consistently not selected for retrieving data for a predetermined number of times. In yet another example, the column cache is not selected based on a number of failed blocks in the column cache. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 Depicted is a block diagram of an example database management system (DBMS) configured to maintain transactional consistency when using a columnar cache in accordance with aspects of the present disclosure.

[0019] Figure 2 Depicted is a block diagram of a column cache having cached data in accordance with aspects of the present disclosure.

[0020] Figure 3 Depicted is a flow diagram of an example process for maintaining transactional consistency when using a columnar cache in accordance with aspects of the present disclosure.

[0021] Figure 4 An example columnar cache with committed data blocks is depicted in accordance with aspects of the present disclosure.

[0022] Figure 5 An example columnar cache with some invalidated data is depicted in accordance with aspects of the present disclosure.

[0023] Figure 6 An example columnar cache in which refreshed data replaces invalidated data is depicted in accordance with aspects of the present disclosure.

[0024] Figure 7Depicted is a block diagram of an example computing environment that implements a DBMS that maintains transactional consistency in a columnar cache in accordance with aspects of the present disclosure. DETAILED DESCRIPTION

[0025] Generally disclosed herein is an implementation for maintaining transactional consistency when using a column cache. At any point in time, the column cache may contain only data visible to all ongoing transactions in the database system. The column cache may be initially loaded with fully visible data, and when data is modified, the corresponding data may be invalidated in the column cache. While MVCC requires maintaining multiple versions of data, the column cache only needs to contain one version visible to everyone.

[0026] As more data becomes invalid in the column cache due to modifications performed by the user after the initial load, the effectiveness of the column cache may decrease, and the query planner may stop selecting the column cache to serve queries. When the query planner does not select the column cache due to a large number of invalid blocks for a predetermined number of times, the corresponding data may be refreshed in the column cache. This refresh can be transparent to ongoing queries. As part of the refresh, the latest fully visible data can be populated while the query is still using the old data in the column cache. When all queries are converted to use the newly populated data, the old data can be removed from the column cache. This refresh can be performed periodically in the background. Each table fragment can be refreshed independently.

[0027] Invalidation can be performed at the block level in the column cache. With block-level invalidation, data can be marked as valid / invalid at the block level in the column cache. If a block is valid in the column cache, the block can contain only fully visible data. Queries can use valid blocks of the column cache and go to the row store for invalid blocks. When a query starts using the column cache, a request can be submitted to asynchronously prefetch invalid blocks from the row store.

[0028] With the implementation disclosed herein as a whole, the column cache no longer needs to be multi-versioned; instead, the column cache may contain only fully visible data versions. However, the column cache may still provide multi-version functionality by reading invalid blocks from the buffer cache and patching the result set of the read query. Since only one version may be maintained in the column cache, significant memory savings may result. Block-level invalidation may simplify the implementation and may reduce the amount of metadata required for the column cache.

[0029] Figure 1A block diagram of an example database management system (DBMS) 100 configured to maintain transaction consistency when using a column cache is depicted. DBMS 101 can be implemented on one or more computing devices in one or more physical locations. For example, DBMS 101 can be configured to manage data on a computing platform of a computing device, which can include multiple computing devices and / or storage devices. DBMS 100 can include a cache consistency engine 101, a column cache 110, a query execution engine 120, and a database 130.

[0030] DBMS 100 may be configured to receive queries, such as query 108 from computing device 105, and resolve the queries by providing responses, such as query response 112. The query response may include one or more rows or columns, or portions of one or more rows or columns, of one or more tables of database 130. Before providing the query response, DBMS 100 may optionally process the data, such as by sorting the rows in the response. The operations for processing the query response may be provided as part of the received query and / or be part of a predetermined pipeline that DBMS 100 is configured to perform as part of resolving the query.

[0031] Computing device 105 can be any of a variety of computing devices configured to query a database. For example, computing device 105 can be a personal laptop, a server, a wearable device, a sensor, etc. Computing device 105 can be user-operated and include peripherals or other components for receiving user input. In other examples, computing device 105 can be configured to automatically communicate with DBMS 100, for example, as part of a computer program, script, or hardware / firmware operation executed by computing device 105. DBMS 101 and computing device 105 can communicate via a network and / or any of a variety of different types of wired or wireless connections.

[0032] In some examples, DBMS100 may be a hybrid transaction and analytical processing system (HTAP). An HTAP system is a database management system configured to perform online transaction processing (OTAP) and online analytical processing (OLAP). An OTAP system is configured to coordinate and execute transactions between communicating computing devices. Transactions are recorded and updated in a corresponding database managed by the OTAP system. An OLAP system is configured to receive and resolve queries to a database, used as part of an analysis of data stored in the database. OLAP systems and OTAP systems are optimized separately for their respective use cases, where OLAP systems are typically optimized for read-only access to data, and OTAP systems are optimized for read and write access to the queried data.

[0033] To improve the performance of query resolution, DBMS 100 may implement a column cache 110. Queries to OLAP systems and HTAP systems that support OLAP may include requests for data referenced by columns of tables in the database, rather than references to individual rows as is more common in OTAP. To speed up query resolution by column, DBMS 100 may implement a column cache 110.

[0034] Column cache 110 may be implemented asynchronously, so sometimes column cache 110 may contain stale data, which may be referred to as invalid blocks. At least for some applications (such as HTAP systems), the system should answer queries and simultaneously accept updates to base tables from which data is cached. DBMS 100 may implement hybrid query execution to allow the use of asynchronous column caches by allowing queries to be executed for which data is retrieved from both column cache 110 and database 130.

[0035] Figure 2 A block diagram of a column cache 110 having cached data is depicted. Figure 2 , a column cache 110 is shown as a cache portion of a database table 201. Columns 5, 15, 25, 35, and 45 in the column cache 110 may be referenced using corresponding table fragment indexes and row indexes. A group of rows may form a data block. Each data block 102, 104 has a corresponding index. Within each block 102, 104, each row of the table fragment has a corresponding row index. Each row of block 102, such as row 10, row 20, and row 30, may be referenced according to the corresponding row index. Similarly, rows 40, 50, and 60 may be referenced according to the corresponding row index. Multiple data blocks may be referred to as table fragments. Depending on performance and overhead requirements, the number of blocks of a table fragment may vary between different implementations, such as 4096 blocks per table fragment. It should be noted that a column cache may include any number of rows, columns, blocks, table fragments, etc., and Figure 2 The number of elements shown in is for illustrative purposes only.

[0036] Column cache 110 may include any of a variety of different types of memory devices for caching data. For example, column cache 110 may be implemented in main memory, such as RAM or DRAM. Additionally or alternatively, column cache 110 may be implemented in a persistent storage device, such as on a solid state drive or on a hard disk drive.

[0037] Return to reference Figure 1, database 130 may be a collection of tables or relationships that store data along multiple dimensions. For example, a table of database 130 may store data along rows and columns of the table. Database 130 may be implemented on a storage device such as a direct attached storage device, including a solid state drive, a hard drive, a flash drive, a network attached storage device, an array of various combinations of different or the same storage devices, etc.

[0038] Query execution engine 120 may be configured to receive query 108 and generate query response 112. Query 108 may be part of a workload executed by computing device 105 or some other device not shown. Workload may refer to one or more computer programs or scripts that include operations for querying DBMS 100 for data. Workload may be automatic and ongoing, or may be executed during pre-programmed time intervals. In other examples, workload is executed on demand by computing device 105, for example, in response to user input to device 105.

[0039] A query to DBMS 100 may include data specifying columns of data to be retrieved from DBMS 100. The specified data may be stored in column cache 110 or in database 130 at execution time. Query execution engine 120 may be configured to retrieve the queried data specified in a given query and return the data as part of a query response.

[0040] As part of resolving a query, DBMS 100 is configured to generate a query execution plan. DBMS 100 may include a planner 135, or a Figure 1 In some examples, planner 135 is shown communicating with a planner 135 external to DBMS 100. Planner 135 can generate a query execution plan according to any of a number of different processes. As part of generating a query execution plan, planner 135 can parse the received query and select corresponding query operations to be performed according to the plan based on a number of predetermined criteria. The predetermined criteria can be based on, for example, efficient use of computing or storage resources, the number of operations to be performed, the total time to execute the query, user input specifying certain types of operations to be performed, etc. Planner 135 can receive and parse queries to generate a query execution plan.

[0041] Query operations may refer to actions performed by the query execution engine 120 as part of executing or resolving a received query. Query operations may include reading data from or writing data to a memory, performing arithmetic or logical calculations, performing corresponding processes for sorting, hashing, joining, and scanning data, etc. A query execution plan may be a directed graph, such as a tree, of nodes representing different operations to be performed by the DBMS as part of executing a query. The query execution plan may also be represented as an ordered list or series of operations based on an order in which the planned operations must be performed to correctly execute the received and parsed query.

[0042] Query response 112 generated by query execution engine 120 is returned to computing device 105. In some examples, query response 112 may be returned to another destination computing device (not shown) that may be specified as a destination by computing device 105. Computing device 105 may continue to process query response 112 as part of a downstream process, which may include subsequent queries to DBMS 100 as part of the same or a different workload.

[0043] DBMS 100 may communicate data between computing device 105 and / or another computing device (not shown) using an interface (such as a graphical user instance) displayed on a display of computing device 105. The interface may include a plurality of user-interactive elements, such as buttons, toggles, sliders, check boxes, etc., for modifying the behavior of DBMS 100 and / or displaying certain types of information currently described. In other examples, the interface may include an API that exposes DBMS 100 for modifying various parameters related to the functionality of DBMS 100, such as cache configuration, based on calls to the API.

[0044] The DBMS 101 may implement a cache consistency engine 101 to maintain cache consistency between the column cache 110 and the database 130. The cache consistency engine 101 may be configured to ensure that the column cache 110 contains data that is visible or committed to ongoing transactions in the DBMS 100 (e.g., queries 108 and responses 112). When data is modified (e.g., overwritten or deleted), the blocks in the column cache 110 representing the modified data are invalid or have become invalid. The cache consistency engine 101 may mark the data block with an "invalid" or "valid" bit to identify the block as invalid or valid. When a block fails, the DBMS 100 may perform a row store operation (such as retrieving data from the database 130) to read the modified data instead of retrieving the data from the column cache 110. For invalid blocks, the cache consistency engine 101 may asynchronously pre-fetch the invalid blocks from the row store to store in a cache separate from the column cache 110 (such as a buffer cache or a file system cache (not shown)). The cache coherence engine 101 allows for ensuring that only one version of the data needs to be maintained in the column cache 110, while the data can still be retrieved quickly and accurately.

[0045] As more data becomes invalid in the column cache due to modifications, the effectiveness of the column cache may decrease, and the query planner 135 or query execution engine 120 may stop selecting the column cache 110 to serve queries. When the query planner 135 does not select the column cache 110 due to a large number of invalid blocks for a predetermined number of times, the column consistency engine 101 may refresh the corresponding data in the column cache 110. This refresh can be transparent to the ongoing query. As part of the refresh, the latest fully visible or committed data can be filled in the column cache 110 while the query is still using the old data in the column cache 110. When all queries are converted to use the newly filled data, the cache consistency engine 101 can remove the old data from the column cache 110. This refresh can be performed periodically in the background. Each table fragment can be refreshed independently.

[0046] Figure 3 A flow chart of an example process 300 for maintaining transactional consistency when using a column cache is depicted. The example process 300 may be performed in a system of one or more processors in one or more locations, such as Figure 1 At any point in time, column cache 110 may contain data that is fully visible to ongoing transactions in DBMS 100.

[0047] As shown in block 310 , the cache coherence engine 101 may load the fully visible data into the columnar cache 110 . Figure 4An example columnar cache 400 is depicted having fully visible data blocks 402, 404. Although only two data blocks are shown for simplicity, it should be noted that a columnar cache may include any number of data blocks forming any number of table fragments.

[0048] As shown in block 320, when data is modified by a transaction, the cache coherence engine 101 invalidates the corresponding data in the column cache 110. The cache coherence engine 101 may perform invalidation at the block level of the column cache 110. Through block-level invalidation, data may be marked as valid / invalid at the block level in the column cache 110. Figure 5 An example columnar cache 400 is depicted in which a block 404 has been invalidated. Invalidated data is illustrated by a cross. The query execution engine 120 may retrieve data from valid blocks of the columnar cache 110, and may retrieve data from the row store of the database 130 for invalid blocks of the columnar cache 110. To increase the speed at which data is retrieved, the cache consistency engine 101 may prefetch invalid blocks from the row store of the database 130. If an invalid block is not filtered by a predicate in a query (e.g., a WHERE clause), the invalid block may be prefetched. The invalid block may be prefetched into a cache separate from the columnar cache 110, such as a buffer cache or a file system cache.

[0049] As shown in block 330 , once the validity of the column cache 110 decreases sufficiently, the cache coherence engine 101 refreshes the column cache 110 with the latest committed data. Figure 6 Depicted is a diagram in which the refreshed data 504 replaces the previously Figure 5108. As more data becomes invalid in the column cache 110 due to data modifications based on executed transactions, the effectiveness of the column cache 110 may decrease, causing the query planner 135 or the query execution engine 120 to stop selecting the column cache 110 to serve the query 108. When the performance of the column cache 110 is not better than the row store in the database 130, the query planner 135 or the query execution engine 120 stops selecting the column cache 110. For example, when more than 50% of the blocks in the column cache 110 are invalid, the performance of the column cache 110 may not be better than the row store. The query planner 135 may estimate the cost value of extracting the invalid blocks from the column cache and repairing the result set of the query being read. If the cost value is above a threshold or the cost value is higher than the cost value of extracting the data completely from the row store, the query planner 135 will not select the column cache 110. When the query planner 135 or the query execution engine 120 does not select the column cache 110 for a predetermined number of times (e.g., 5 times based on a balance between miscounting and avoiding thrashing), the cache coherence engine 101 refreshes the data in the column cache 110. This refresh can be transparent to the ongoing query 108. As part of the refresh, the newly submitted data can be filled while the query 108 is still using the old data previously populated in the column cache 110. When all queries are converted to use the newly populated data, the old data can be removed from the column cache 110. The cache coherence engine 101 can perform refreshes periodically in the background while transactions are occurring. The cache coherence engine 101 can also refresh individual data blocks, individual table fragments, or refresh the entire column cache 110 independently.

[0050] Figure 7 A block diagram of an example computing environment 600 implementing a DBMS 100 that maintains transactional consistency in a columnar cache is depicted. The DBMS 100 may be implemented on one or more devices having one or more processors in one or more locations, such as in a server computing device 615. The user computing device 612 and the server computing device 615 may be communicatively coupled to one or more storage devices 630 via a network 660. The server computing device 615 and the storage device 630 may form part of a computing platform 601. The computing platform 601 may be a cloud computing platform, thereby providing a variety of different services, such as for providing computing and storage resources to platform users.

[0051] The storage device 630 may be a combination of volatile and non-volatile memory and may be located at the same or a different physical location than the computing devices 612, 615. For example, the storage device 630 may include any type of non-transitory computer-readable medium capable of storing information, such as a hard drive, a solid-state drive, a tape drive, optical storage, a memory card, ROM, RAM, DVD, CD-ROM, writable memory, and read-only memory.

[0052] The server computing device 615 may include one or more processors 613 and memory 614. The memory 614 may store information accessible by the processor 613, including instructions 621 executable by the processor 613. The memory 614 may also include data 623 that may be retrieved, manipulated, or stored by the processor 613. The memory 614 may be a type of non-transitory computer-readable medium capable of storing information accessible by the processor 613, such as volatile memory and non-volatile memory. The processor 613 may include one or more central processing units (CPUs), graphics processing units (GPUs), field programmable gate arrays (FPGAs), and / or application specific integrated circuits (ASICs), such as tensor processing units (TPUs).

[0053] Instructions 621 may include one or more instructions that, when executed by processor 613, cause one or more processors to perform actions defined by the instructions. Instructions 621 may be stored in an object code format for direct processing by processor 613, or in other formats including interpretable scripts or a collection of independent source code modules that are interpreted on demand or compiled in advance. Instructions 621 may include instructions for implementing system 100 consistent with various aspects of the present disclosure. System 100 may be executed using processor 613 and / or using other processors located remotely from server computing device 615.

[0054] Data 623 may be retrieved, stored, or modified by processor 613 according to instructions 621. Data 623 may be stored in a computer register, in a relational or non-relational database as a table with multiple different fields and records, or as a JSON, YAML, proto, or XML document. Data 623 may also be formatted in a computer readable format, such as, but not limited to, binary values, ASCII, or Unicode. In addition, data 623 may include information sufficient to identify relevant information, such as numbers, descriptive text, proprietary codes, pointers, references to data stored in other memories (including other network locations), or information used by functions to calculate related data.

[0055] The user computing device 612 may also be configured similarly to the server computing device 615, with one or more processors 616, memory 617, instructions 618, and data 619. The user computing device 612 may also include a user output 626 and a user input 624. The user input 624 may include any suitable mechanism or technology for receiving input from a user, such as a keyboard, a mouse, a mechanical actuator, a soft actuator, a touch screen, a microphone, and a sensor.

[0056] The server computing device 615 may be configured to transmit data to the user computing device 612, and the user computing device 612 may be configured to display at least a portion of the received data on a display implemented as part of the user output 626. The user output 626 may also be used to display an interface between the user computing device 612 and the server computing device 615. The user output 626 may alternatively or additionally include one or more speakers, transducers or other audio outputs, haptic interfaces, or other tactile feedback that provides non-visual and non-audible information to a platform user of the user computing device 612.

[0057] Although Figure 7 Processors 613, 616 and memories 614, 616 are illustrated as being within computing devices 615, 612, but the components described in this specification (including processors 613, 616 and memories 614, 617) may include multiple processors and memories that may be in different physical locations and not operated within the same computing device. For example, some of instructions 621, 618 and data 623, 619 may be stored on a removable SD card, while others may be stored in a read-only computer chip. Some or all of the instructions and data may be stored in a location physically away from processors 613, 616 but still accessible by processors 613, 616. Similarly, processors 613, 616 may include a collection of processors that may perform concurrent and / or sequential operations. Computing devices 615, 612 may each include one or more internal clocks that provide timing information, which may be used for time measurement of operations and programs run by computing devices 615, 612.

[0058] Server computing device 615 may be configured to receive requests from user computing device 612 to process data. For example, environment 600 may be part of a computing platform configured to provide a variety of services to users through various user interfaces and / or APIs that expose platform services. One or more services may be a machine learning framework or a set of tools for generating neural networks or other machine learning models based on specified tasks and training data. User computing device 612 may receive and transmit data specifying target computing resources to be allocated for executing a neural network that is trained to perform a specific neural network task.

[0059] Devices 612, 615 may be able to communicate directly and indirectly over network 660. Devices 615, 612 may set up listening sockets that may accept initiated connections for sending and receiving information. Network 660 itself may include a variety of configurations and protocols, including the Internet, the World Wide Web, an intranet, a virtual private network, a wide area network, a local area network, and a private network using one or more company-proprietary communication protocols. Network 660 may support a variety of short-range and long-range connections. Short-range and long-range connections may be made over different bandwidths, such as those typically associated with 2.402 GHz to 2.480 GHz, usually associated with the 2.4 GHz and 5 GHz associated with communication protocols; or using multiple communication standards, such as for wireless broadband communication Additionally or alternatively, the network 660 may also support wired connections between the devices 612, 615 (including through various types of Ethernet connections).

[0060] although Figure 7 615 and user computing device 612 are shown, but it should be understood that aspects of the present disclosure may be implemented according to a variety of different configurations and numbers of computing devices (including in examples for sequential or parallel processing), or through a distributed network of multiple devices. In some implementations, aspects of the present disclosure may be performed on a single device and any combination thereof.

[0061] Aspects of the present disclosure may be implemented in digital circuits, computer-readable storage media as one or more computer programs, or a combination of one or more of the foregoing. The computer-readable storage medium may be non-transitory, for example, as one or more instructions executable by a cloud computing platform and stored on a tangible storage device.

[0062] In this specification, the phrase "configured to" is used in different contexts related to a computer system, hardware, or part of a computer program, engine, or module. When a system is said to be configured to perform one or more operations, this means that the system has appropriate software, firmware, and / or hardware installed on the system, which software, firmware, and / or hardware causes the system to perform one or more operations when in operation. When a piece of hardware is said to be configured to perform one or more operations, this means that the hardware includes one or more circuits that receive inputs when in operation and generate outputs based on the inputs and corresponding to the one or more operations. When a computer program, engine, or module is said to be configured to perform one or more operations, this means that the computer program includes one or more program instructions that, when executed by one or more computers, cause the one or more computers to perform one or more operations.

[0063] Although the operations shown in the drawings and described in the claims are shown in a particular order, it should be understood that the operations may be performed in a different order than shown, and some operations may be omitted, performed more than once, and / or performed in parallel with other operations. In addition, the separation of different system components configured to perform different operations should not be understood as requiring the separation of components. The components, modules, programs, and engines described may be integrated together as a single system or as part of multiple systems.

[0064] Unless otherwise stated, the foregoing alternative examples are not mutually exclusive, but may be implemented in various combinations to achieve unique advantages. Since these and other variations and combinations of the features discussed above may be utilized without departing from the subject matter defined by the claims, the description of the foregoing embodiments should be made in an illustrative manner rather than in a manner that limits the subject matter defined by the claims. In addition, the examples described herein and the provision of clauses expressed as "such as," "including," etc. should not be interpreted as limiting the subject matter of the claims to specific examples; rather, these examples are intended to illustrate only one of many possible embodiments. In addition, the same reference numerals in different figures may identify the same or similar elements.

Claims

1. A method for maintaining transactional consistency when retrieving data from a columnar cache, It is characterized in that The method comprises: loading, using one or more processors, a first plurality of blocks corresponding to data into the column cache; invalidating, using the one or more processors, the one or more blocks in the first plurality of blocks when data corresponding to the one or more blocks in the corresponding row store is modified; and The column cache is refreshed with the one or more processors with a second plurality of blocks corresponding to the modified data to replace the failed blocks.

2. The method according to claim 1, It is characterized in that The first plurality of blocks includes valid blocks corresponding to all visible data.

3. The method according to claim 1, It is characterized in that Further including: A row store operation is performed using the one or more processors to retrieve data for the failed block.

4. The method according to claim 1, It is characterized in that Further including: The modified data is pre-fetched from a row store using the one or more processors.

5. The method according to claim 1, It is characterized in that Further including: Determining, with the one or more processors, to flush the column cache based on the validity of the column cache.

6. The method according to claim 5, It is characterized in that Wherein the validity of the column cache is based on whether the column cache is consistently not selected for retrieving data a predetermined number of times.

7. The method according to claim 6, It is characterized in that Wherein the column cache is not selected based on a number of failed blocks in the column cache.

8. A system, It is characterized in that include: one or more processors; as well as one or more storage devices coupled to the one or more processors and storing instructions that, when executed by the one or more processors, cause the one or more processors to perform operations for maintaining transactional consistency when retrieving data from a columnar cache, the operations comprising: loading a first plurality of blocks corresponding to data into the column cache; invalidating one or more blocks of the first plurality of blocks when data corresponding to the one or more blocks of the first plurality of blocks is modified in a corresponding row store; and The column cache is refreshed with a second plurality of blocks corresponding to the modified data to replace the failed blocks.

9. The system of claim 8, It is characterized in that The first plurality of blocks includes valid blocks corresponding to all visible data.

10. The system of claim 8, It is characterized in that The operations further include performing a row store operation to retrieve data for the failed block.

11. The system of claim 8, It is characterized in that The operation further comprises pre-fetching the modified data from a row store.

12. The system of claim 8, It is characterized in that The operations further include determining to flush the column cache based on the validity of the column cache.

13. The system of claim 12, It is characterized in that Wherein the validity of the column cache is based on whether the column cache is consistently not selected for retrieving data a predetermined number of times.

14. The system of claim 13, It is characterized in that Wherein the column cache is not selected based on a number of failed blocks in the column cache.

15. A non-transitory computer-readable medium for storing instructions, It is characterized in that The instructions, when executed by one or more processors, cause the one or more processors to perform operations for maintaining transactional consistency when retrieving data from a column cache, the operations comprising: loading a first plurality of blocks corresponding to data into the column cache; invalidating one or more blocks of the first plurality of blocks when data corresponding to the one or more blocks of the first plurality of blocks is modified in a corresponding row store; and The column cache is refreshed with a second plurality of blocks corresponding to the modified data to replace the failed blocks.

16. The non-transitory computer readable medium of claim 15, It is characterized in that The first plurality of blocks includes valid blocks corresponding to all visible data.

17. The non-transitory computer readable medium of claim 15, It is characterized in that The operations further include performing a row store operation to retrieve data for the failed block.

18. The non-transitory computer readable medium of claim 15, It is characterized in that The operation further comprises pre-fetching the modified data from a row store.

19. The non-transitory computer readable medium of claim 15, It is characterized in that The operations further include determining to flush the column cache based on the validity of the column cache.

20. The non-transitory computer readable medium of claim 19, It is characterized in that Wherein the validity of the column cache is based on whether the column cache is consistently not selected for retrieving data a predetermined number of times.

21. The non-transitory computer readable medium of claim 20, It is characterized in that Wherein the column cache is not selected based on a number of failed blocks in the column cache.

Citation Information

Patent Citations

  • Efficient methods and systems for consistent read in record-based multi-version concurrency control

    CN106462586A

  • Caching external data sources for SQL processing

    US20140317084A1

  • Granular creation and refresh of columnar data

    US20150088824A1

  • Systems and methods for cache coherence protocol

    US20150331794A1