US 11,868,333 B2
Data read/write method and apparatus for database
Mingjian Que, Hangzhou (CN); Chuanting Wang, Beijing (CN); and Junjie Wang, Hangzhou (CN)
Assigned to HUAWEI TECHNOLOGIES CO., LTD., Shenzhen (CN)
Filed by Huawei Technologies Co., Ltd., Shenzhen (CN)
Filed on Jun. 10, 2022, as Appl. No. 17/837,496.
Application 17/837,496 is a continuation of application No. PCT/CN2020/120216, filed on Oct. 10, 2020.
Claims priority of application No. 201911282832.6 (CN), filed on Dec. 13, 2019; and application No. 202010077018.7 (CN), filed on Jan. 23, 2020.
Prior Publication US 2022/0300477 A1, Sep. 22, 2022
Int. Cl. G06F 15/16 (2006.01); G06F 16/22 (2019.01); G06F 16/27 (2019.01); G06F 16/2455 (2019.01); G06F 9/50 (2006.01)
CPC G06F 16/2282 (2019.01) [G06F 9/5088 (2013.01); G06F 16/24552 (2019.01); G06F 16/27 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A data read/write method for a database implemented by a computer apparatus, wherein the data read/write method comprises:
creating a first tablespace carrying a first identifier indicating a first node;
establishing a first connection to a client, wherein the first connection comprises the first identifier;
receiving a first read/write request from the client using the first connection;
determining the first tablespace corresponding to the first connection;
determining, from a plurality of second nodes and the first identifier, the first node corresponding to the first connection or the first tablespace, wherein the computer apparatus comprises the second nodes, and wherein each of the second nodes comprises a first processor and a first memory, wherein the first connection carries the first identifier after determining the first node;
loading data in the first tablespace to the first memory in the first node;
processing the first read/write request using a first working thread that is generated by the first processor in the first node;
processing, by a second working thread in a first thread pool of the computer apparatus, a second read/write request on a second connection carrying the first identifier; and
processing, by a third working thread in a second thread pool of the computer apparatus, a third read/write request on a third connection that does not carry the first identifier.