IP Library Granted Patent US 12,367,189
Granted Patent B2
US 12,367,189 · App. 17/897,881 · Granted Jul 22, 2025

Systems and methods for efficient bulk data deletion

Inventors: Angela Lin (Ottawa, CA); Dylan Ellicott (Ottawa, CA); Marin Creanga (Ottawa, CA)
Assignee: Kinaxis Inc.
G06F16/2386G06F16/22G06F16/2343G06F16/2358
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,367,189
App. No.
17/897,881
Granted
Jul 22, 2025
Kind
B2
Abstract

Systems and methods for efficient bulk data deletion. The system comprises: 1) a deletion record set; an in-memory database representation comprising: tables and records; one or more exclusive locks for the records; and a record block index; 2) a persistent database representation comprising: record blocks; and a transaction log. The method comprises: receiving, by a processor, a deletion record set; acquiring, by the processor, an exclusive lock for one or more records in the deletion record set; deleting, by the processor, the deletion record set from an in-memory representation of the database; generating, by the processor, one or more post-delete record block sets; updating, by the processor, an in-memory record block index; writing, by the processor, the one or more post-delete record block sets to a persistent storage representation of the database; and, adding, by the processor, a transaction log entry for the record block index update.

Claims (89)

1. A computer-implemented method for bulk data deletion from a database, the method comprising:

receiving, by a processor, a deletion record set for the bulk data deletion identified by executing an internal database procedure or querying an in-memory representation of the database for records that match certain conditions, wherein the bulk data deletion is performed without taking the database offline;

acquiring, by the processor, an exclusive lock for one or more records in the deletion record set;

deleting, by the processor, the deletion record set from the in-memory representation of the database and, to maintain referential integrity of the database, additionally deleting records that reference records in the deletion record set;

generating, by the processor, one or more post-delete record block sets, wherein the one or more post delete record blocks are different from the deletion record set;

updating, by the processor, an in-memory record block index, wherein the record block index has an access control mechanism which enables an atomic update of its contents;

writing, by the processor, the one or more post-delete record block sets to a persistent storage representation of the database;

adding, by the processor, a transaction log entry for the updated record block index update, wherein the each transaction log entry describes an ACID (atomic, consistent, isolated and durable) update to the database;

replacing, by the processor, the record block for an unprocessed table associated with an unprocessed version with the post-delete record blocks for a selected table and a selected version; and

executing, by the processor, the deleting of the deletion record set from the in-memory representation of the database, and the generating of the one or more post-delete record block sets, in parallel.

2. The computer-implemented method of claim 1 , wherein:

updating, by the processor, the in-memory record block index, is performed in parallel with:

writing, by the processor, the one or more post-delete record block sets to the persistent storage representation of the database; and

adding, by the processor, the transaction log entry for the updated record block index update.

3. The computer-implemented method of claim 1 , wherein generating the one or more post-delete record block sets comprises:

initializing, by the processor, a list of post-delete record block sets to empty;

selecting, by the processor, an unprocessed table from the database;

selecting, by the processor, an unprocessed version from the selected table;

generating, by the processor, a post-delete record block set for the selected table and the selected version; and

adding, by the processor, the post-delete record block set for the selected table, and selected version to the list of post-delete record block sets.

4. The computer-implemented method of claim 3 , wherein generating the post-delete record block set for the selected table and the selected version comprises:

initializing, by the processor, a per-(table, version) post-delete record block set to empty;

selecting, by the processor, an unprocessed record block from a pre-delete set, the unprocessed record block containing a record to be deleted;

producing, by the processor, a modified copy of the record block that omits both a record id and a record body that corresponds to the record to be deleted; and

adding, by the processor, the modified copy to the per (table, version) post-delete record block set.

5. The computer-implemented method of claim 1 , wherein updating the in-memory record block index comprises:

selecting, by the processor, an unprocessed version;

selecting, by the processor, an unprocessed table associated with the unprocessed version;

replacing, by the processor, the record block for the selected table and the selected version with the post-delete record blocks for the selected table and the selected version.

6. A system comprising:

a processor; and

a memory storing instructions that, when executed by the processor, configure the system to:

receive, by the processor, a deletion record set for bulk data deletion identified by executing an internal database procedure or querying an in-memory representation of the database for records that match certain conditions, wherein the bulk data deletion is performed without taking the database offline;

acquire, by the processor, an exclusive lock for one or more records in the deletion record set;

delete, by the processor, the deletion record set from the in-memory representation of a database and, to maintain referential integrity of the database, additionally delete records that reference records in the deletion record set;

generate, by the processor, one or more post-delete record block sets, wherein the one or more post delete record blocks are different from the deletion record set;

update, by the processor, an in-memory record block index, wherein the record block index has an access control mechanism which enables an atomic update of its contents;

write, by the processor, the one or more post-delete record block sets to a persistent storage representation of the database; and

add, by the processor, a transaction log entry for the updated record block index update, wherein the each transaction log entry describes an ACID (atomic, consistent, isolated and durable) update to the database;

replace, by the processor, the record block for an unprocessed table associated with an unprocessed version with the post-delete record blocks for a selected table and a selected version; and

execute, by the processor, the deletion of the deletion record set from the in-memory representation of the database, and the generation of the one or more post-delete record block sets, in parallel.

7. The system of claim 6 , wherein the memory storing instructions that, when executed by the processor, further configure the system to:

execute, by the processor, updating the in-memory record block index, in parallel with:

writing the one or more post-delete record block sets to the persistent storage representation of the database; and

adding the transaction log entry for the updated record block index update.

8. The system of claim 6 , wherein when generating the one or more post-delete record block sets, the memory storing instructions that, when executed by the processor, further configure the system to:

initialize, by the processor, a list of post-delete record block sets to empty;

select, by the processor, an unprocessed table from the database;

select, by the processor, an unprocessed version from the selected table;

generate, by the processor, a post-delete record block set for the selected table and the selected version; and

add, by the processor, the post-delete record block set for the selected table, and selected version to the list of post-delete record block sets.

9. The system of claim 8 , wherein when generating the post-delete record block set for the selected table and the selected version, the memory storing instructions that, when executed by the processor, further configure the system to:

initialize, by the processor, a per-(table, version) post-delete record block set to empty;

select, by the processor, an unprocessed record block from a pre-delete set, the unprocessed record block containing a record to be deleted;

produce, by the processor, a modified copy of the record block that omits both a record id and a record body that corresponds to the record to be deleted; and

add, by the processor, the modified copy to the per (table, version) post-delete record block set.

10. The system of claim 6 , wherein when updating the in-memory record block index, the memory storing instructions that, when executed by the processor, further configure the system to:

select, by the processor, an unprocessed version;

select, by the processor, an unprocessed table associated with the unprocessed version;

replace, by the processor, the record block for the selected table and the selected version with the post-delete record blocks for the selected table and the selected version.

11. A non-transitory computer-readable storage medium, the computer-readable storage medium including instructions that when executed by a computer, cause the computer to:

receive, by a processor, a deletion record set for bulk data deletion identified by executing an internal database procedure or querying an in-memory representation of the database for records that match certain conditions, wherein the bulk data deletion is performed without taking the database offline;

acquire, by the processor, an exclusive lock for one or more records in the deletion record set;

delete, by the processor, the deletion record set from the in-memory representation of a database and, to maintain referential integrity of the database, additionally delete records that reference records in the deletion record set;

generate, by the processor, one or more post-delete record block sets, wherein the one or more post delete record blocks are different from the deletion record set;

update, by the processor, an in-memory record block index, wherein the record block index has an access control mechanism which enables an atomic update of its contents;

write, by the processor, the one or more post-delete record block sets to a persistent storage representation of the database; and

add, by the processor, a transaction log entry for the updated record block index update, wherein the transaction log entry describes an ACID (atomic, consistent, isolated and durable) update to the database;

replacing, by the processor, the record block for an unprocessed table associated with an unprocessed version with the post-delete record blocks for a selected table and a selected version; and

execute, by the processor, the deletion of the deletion record set from the in-memory representation of the database, and the generation of the one or more post-delete record block sets, in parallel.

12. The computer-readable storage medium of claim 11 , wherein the computer-readable storage medium including instructions that when executed by the computer, further cause the computer to:

execute, by the processor, updating the in-memory record block index, in parallel with:

writing the one or more post-delete record block sets to the persistent storage representation of the database; and

adding the transaction log entry for the updated record block index update.

13. The computer-readable storage medium of claim 11 , wherein when generating the one or more post-delete record block sets, the computer-readable storage medium including instructions that when executed by the computer, further cause the computer to:

initialize, by the processor, a list of post-delete record block sets to empty;

select, by the processor, an unprocessed table from the database;

select, by the processor, an unprocessed version from the selected table;

generate, by the processor, a post-delete record block set for the selected table and the selected version; and

add, by the processor, the post-delete record block set for the selected table, and selected version to the list of post-delete record block sets.

14. The computer-readable storage medium of claim 13 , wherein when generating the post-delete record block set for the selected table and the selected version, the computer-readable storage medium including instructions that when executed by the computer, further cause the computer to:

initialize, by the processor, a per-(table, version) post-delete record block set to empty;

select, by the processor, an unprocessed record block from a pre-delete set, the unprocessed record block containing a record to be deleted;

produce, by the processor, a modified copy of the record block that omits both a record id and a record body that corresponds to the record to be deleted; and

add, by the processor, the modified copy to the per (table, version) post-delete record block set.

15. The computer-readable storage medium of claim 11 , wherein when updating the in-memory record block index, the computer-readable storage medium including instructions that when executed by the computer, further cause the computer to:

select, by the processor, an unprocessed version;

select, by the processor, an unprocessed table associated with the unprocessed version;

replace, by the processor, the record block for the selected table and the selected version with the post-delete record blocks for the selected table and the selected version.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 16, 2023
From: LIN, ANGELA; CREANGA, MARIN; ELLICOTT, DYLAN
To: KINAXIS INC.
Reel/Frame 062723/0896 →
Continuity (2)
Provisional Application 63238348 · Aug 30, 2021
Related Publication 20230064907A1 · Mar 2, 2023
References Cited (17)
US 4648036A · Gallant · 1987 [cited by applicant]
US 5551046A · Mohan et al. · 1996 [cited by applicant]
US 5884307A · Depledge et al. · 1999 [cited by applicant]
US 6535869B1 · Housel, III · 2003 [cited by applicant]
US 6606626B1 · Ponnekanti · 2003 [cited by examiner]
US 7765211B2 · Bhattacharjee et al. · 2010 [cited by applicant]
US 7962447B2 · Chen et al. · 2011 [cited by applicant]
US 9348833B2 · Schreter et al. · 2016 [cited by applicant]
US 9875054B2 · Vishniac et al. · 2018 [cited by applicant]
US 10133500B2 · Vishniac et al. · 2018 [cited by applicant]
US 10671641B1 · Holenstein et al. · 2020 [cited by applicant]
US 10740312B1 · Mritunjai et al. · 2020 [cited by applicant]
US 20070055702A1 · Fridella · 2007 [cited by examiner]
US 20070130224A1 · Fischer et al. · 2007 [cited by applicant]
US 20140317048A1 · Wang · 2014 [cited by examiner]
US 20160012549A1 · Block et al. · 2016 [cited by applicant]
US 20210096886A1 · McLachlan · 2021 [cited by examiner]