US 12,032,995 B1
Asynchronous task queue configuration in a database system
Gabriel Kliot, Redmond, WA (US); Ruji Xie, Bellevue, WA (US); Subramanian Muralidhar, Mercer Island, WA (US); and William Waddington, Stateline, NV (US)
Assigned to Snowflake Inc., Bozeman, MT (US)
Filed by Snowflake Inc., Bozeman, MT (US)
Filed on Jul. 28, 2023, as Appl. No. 18/361,549.
Int. Cl. G06F 9/48 (2006.01)
CPC G06F 9/4881 (2013.01) 30 Claims
OG exemplary drawing
 
1. A method comprising:
decoding, by at least one hardware processor, an enqueue request received from a data process of a database system, the enqueue request including a task;
enqueuing the task and one or more additional tasks in an in-memory task queue, the enqueuing based on a pre-configured queuing scheme;
encoding an enqueue acknowledgment for transmission to the data process responsive to the enqueue request;
persisting the task in a storage location associated with the in-memory task queue;
responsive to a lease request received from a worker node, initiating a lease of the task to the worker node, the initiating including updating a state of the task maintained in the storage location; and
responsive to a dequeue request received from the worker node and indicating completion of the task by the worker node, dequeuing the task from the in-memory task queue.