CPC G06F 11/1438 (2013.01) [G06F 11/1453 (2013.01); G06F 11/1466 (2013.01); G06F 11/1471 (2013.01); G06F 16/2272 (2019.01); G06F 16/2282 (2019.01); G06F 16/2322 (2019.01); G06F 16/2329 (2019.01); G06F 16/2343 (2019.01); G06F 16/2379 (2019.01); H04L 67/10 (2013.01); G06F 2201/80 (2013.01)] | 18 Claims |
1. A method, comprising:
allocating, by a database node, a plurality of memory segments for a database, wherein the plurality of memory segments includes a restart segment that can be used to store data records;
spawning, by the database node, a set of processes to read a database log written by another database node and replay log records of the database log to update the restart segment to store a set of data records of the database;
determining, by the database node, to perform a restart operation to transition from a read mode to a write mode in which the database node is permitted to process write transactions, wherein the restart operation includes:
causing the set of processes to stop reading the database log at a stop position in the database log;
storing, based on the stop position, database state information that enables the set of processes to resume reading the database log from the stop position;
deallocating at least one of the plurality of memory segments other than the restart segment; and
terminating the set of processes; and
after performing the restart operation, the database node spawning the set of processes, wherein the set of processes is operable to resume reading of the database log based on the database state information.
|