Abstract:
A method includes receiving an execution request, where the execution request is used to request to execute a task including at least two stored procedures, requesting at least two threads, and dispatching each stored procedure in the task to one of the at least two threads for execution, receiving Structured Query Language (SQL) statements sent by the at least two threads when the at least two threads execute the stored procedures included in the task, and grouping and caching the received SQL statements based on a same access characteristic, and for an SQL statement cache group that satisfies a preset trigger condition, calling an SQL statement execution engine to execute an SQL statement in the SQL statement cache group.
Abstract:
Embodiments of the present invention disclose a method and apparatus of cache management for a non-volatile storage device. The method embodiment includes: determining a size relationship between a capacity sum of a clean page subpool and a dirty page subpool and a cache capacity; determining, when the capacity sum is equal to the cache capacity, whether identification information of a to-be-accessed page is in a history list of clean pages or a history list of dirty pages; and when it is determined that the identification information of the to-be-accessed page is in the history list of clean pages, adding a first adjustment value to a clean page subpool capacity threshold; and when the identification information of the to-be-accessed page is in the history list of dirty pages, subtracting a second adjustment value from the clean page subpool capacity threshold.
Abstract:
Embodiments of this disclosure provide a data search method and apparatus, and an electronic device. The method includes obtaining a search request, where the search request includes a query graph formed by a plurality of nodes and a plurality of edges between the plurality of nodes, each node represents an object, and each edge represents an association relationship between objects; determining a plurality of query subgraphs based on the query graph, where each query subgraph includes a group of nodes in the plurality of nodes and edges between the group of nodes, and the plurality of query subgraphs have at least one same node in the plurality of nodes; searching a target data graph in parallel for data subgraphs that respectively match the plurality of query subgraphs; and merging the data subgraphs that respectively match the plurality of query subgraphs, to determine a search result that matches the query graph.
Abstract:
Embodiments of the present invention disclose a method and apparatus of cache management for a non-volatile storage device. The method embodiment includes: determining a size relationship between a capacity sum of a clean page subpool and a dirty page subpool and a cache capacity; determining, when the capacity sum is equal to the cache capacity, whether identification information of a to-be-accessed page is in a history list of clean pages or a history list of dirty pages; and when it is determined that the identification information of the to-be-accessed page is in the history list of clean pages, adding a first adjustment value to a clean page subpool capacity threshold; and when the identification information of the to-be-accessed page is in the history list of dirty pages, subtracting a second adjustment value from the clean page subpool capacity threshold.
Abstract:
A resource management method and apparatus are provided. The resource management method includes: selecting, by a resource manager RM, according to a type and a quantity of application masters AMs that need to be started in advance, resources from resources registered by a node manager, encapsulating the resources into multiple containers matching the AMs, and starting the AMs in the matching containers; and when the RM receives a job submitted by a client, checking, in the AMs according to information about the job, whether there is a matching AM to be used to execute the job, and if there is a matching AM, submitting the job to the matching AM for execution. Such that, when a client submits a job, the job can be submitted to an AM that has been started in advance for execution, thereby reducing latency resulting from resource allocation and AM startup.
Abstract:
A database replication method and apparatus for a distributed system are provided and relate to the database field. The method includes: receiving by a coordination server, a timestamp of a multi-partition transaction newly added to a first partition of a secondary cluster; determining, by the coordination server, a target timestamp for the first partition based on the received timestamp of the newly added multi-partition transaction and a stored multi-partition transaction timestamp of each partition of the secondary cluster; and sending, by the coordination server, the target timestamp to the first partition, so that the first partition executes a replication log in the first partition based on the target timestamp. In this way, the corresponding partition can execute, without waiting, a multi-partition transaction that is present in all the partitions but has not been executed, thereby avoiding data inconsistency and increasing replication efficiency.
Abstract:
A Bloom filter generation method and apparatus is presented, where the method includes acquiring to-be-combined files, when a quantity of deletion records in the to-be-combined files falls within a false positive permission range, acquiring a Bloom filter of each to-be-combined file, where capacities of Bloom filters of different to-be-combined files are the same, and performing a bitwise OR operation on bit values at same locations in Bloom filters of the different to-be-combined files, in order to obtain a target Bloom filter and use the target Bloom filter as a Bloom filter of a combined file obtained by combining the different to-be-combined files, and hence an amount of calculation processing in Bloom filter generation is reduced, a system resource is reduced, and resource overheads are reduced.
Abstract:
A database replication method and apparatus for a distributed system are provided and relate to the database field. The method includes: receiving by a coordination server, a timestamp of a multi-partition transaction newly added to a first partition of a secondary cluster; determining, by the coordination server, a target timestamp for the first partition based on the received timestamp of the newly added multi-partition transaction and a stored multi-partition transaction timestamp of each partition of the secondary cluster; and sending, by the coordination server, the target timestamp to the first partition, so that the first partition executes a replication log in the first partition based on the target timestamp. In this way, the corresponding partition can execute, without waiting, a multi-partition transaction that is present in all the partitions but has not been executed, thereby avoiding data inconsistency and increasing replication efficiency.
Abstract:
Embodiments of the present invention disclose a method and apparatus of cache management for a non-volatile storage device. The method embodiment includes: determining a size relationship between a capacity sum of a clean page subpool and a dirty page subpool and a cache capacity; determining, when the capacity sum is equal to the cache capacity, whether identification information of a to-be-accessed page is in a history list of clean pages or a history list of dirty pages; and when it is determined that the identification information of the to-be-accessed page is in the history list of clean pages, adding a first adjustment value to a clean page subpool capacity threshold; and when the identification information of the to-be-accessed page is in the history list of dirty pages, subtracting a second adjustment value from the clean page subpool capacity threshold.
Abstract:
A Bloom filter generation method and apparatus is presented, where the method includes acquiring to-be-combined files, when a quantity of deletion records in the to-be-combined files falls within a false positive permission range, acquiring a Bloom filter of each to-be-combined file, where capacities of Bloom filters of different to-be-combined files are the same, and performing a bitwise OR operation on bit values at same locations in Bloom filters of the different to-be-combined files, in order to obtain a target Bloom filter and use the target Bloom filter as a Bloom filter of a combined file obtained by combining the different to-be-combined files, and hence an amount of calculation processing in Bloom filter generation is reduced, a system resource is reduced, and resource overheads are reduced.