Mechanisms for handling schema changes

US11940963B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11940963-B2
Application numberUS-202117457244-A
CountryUS
Kind codeB2
Filing dateDec 1, 2021
Priority dateDec 1, 2021
Publication dateMar 26, 2024
Grant dateMar 26, 2024

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Techniques are disclosed relating to database schemas. A computer system may receive a metadata document that describes an updated schema for a database that stores a plurality of records. The computer system may instantiate a set of processes to perform an upgrade routine to upgrade ones of the plurality of records to comply with the updated schema. While the set of processes are upgrading the records, the computer system may receive a request to perform an operation on one of the plurality of records. The computer system may detect that the record corresponds to an earlier schema version than a version of the updated schema of the metadata document and may upgrade the record to comply with that updated schema. After upgrading the record, the computer system may perform the requested operation on the record.

First claim

Opening claim text (preview).

What is claimed is: 1. A method, comprising: receiving, by a computer system, a metadata document describing an updated schema for a database that stores a plurality of records, wherein the updated schema describes a set of database entities and a corresponding set of statuses, and wherein a status of the set of statuses indicates whether a corresponding database entity can be used to process requests; instantiating, by the computer system, a set of processes to perform an upgrade routine to upgrade the plurality of records to comply with the updated schema; while the set of processes are upgrading the plurality of records, the computer system: receiving, from a client, a request to perform an operation on one of the plurality of records; detecting that the record corresponds to an earlier schema version than a version of the updated schema of the metadata document; upgrading the record to comply with the updated schema; and after upgrading the record, performing the requested operation on the record; and in response to receiving a status request from the client for a status of a particular one of the set of database entities, the computer system returning a response indicating the status of the particular database entity that causes the client to determine that the particular database entity is usable to process requests from the client. 2. The method of claim 1 , wherein one of the set of database entities is an index, wherein the method further comprises: updating, within the metadata document by the computer system, a status of a table on which the index is based, wherein the updated status of the table prevents the table from being deleted while the index is being created. 3. The method of claim 1 , wherein the updated schema describes an index not described in the earlier schema version, and wherein upgrading the record to comply with the updated schema includes: populating the index with an entry for the record; and after populating the index with the entry, updating a version of the record to match the version of the updated schema. 4. The method of claim 1 , wherein the request specifies a minimum schema version to be used in processing the received request, and wherein the method further comprises: detecting, by the computer system, that a schema stored in a memory of the computer system does not satisfy the minimum schema version specified by the request; and replacing, in the memory, the stored schema with the updated schema. 5. The method of claim 1 , wherein the updated schema describes a set of updates to a set of database entities, and wherein a first one of the set of database entities is migrated before a second one of the set of database entities such that the first database entity is available for use before the second database entity. 6. The method of claim 1 , wherein the record is upgraded and returned to an issuer of the request without being stored in the database, and wherein the record is subsequently upgraded by one of the set of processes and stored in the database. 7. The method of claim 1 , further comprising: subsequent to the set of processes performing the upgrade routine, the computer system instantiating a set of scrutiny processes to determine whether all of the plurality of records have been upgraded to comply with the updated schema. 8. A non-transitory computer readable medium having program instructions stored thereon that are executable by a computer system to cause the computer system to perform operations comprising: receiving a metadata document describing an updated schema for a database that stores a plurality of records; instantiating a set of processes to perform an upgrade routine to upgrade the plurality of records to comply with the updated schema; and receiving, from a client, a first request to perform an operation on one of the plurality of records; detecting that the record corresponds to an earlier schema version than a version of the updated schema of the metadata document; upgrading the record to comply with the updated schema; after upgrading the record, performing the requested operation on the record; in response to upgrading records associated with a database entity, updating a status of the database entity to indicate that the database entity can be used in processing requests; in response to receiving a second request from the client for the status of the database entity associated with the updated schema, returning a response indicating the status of the database entity to enable the client to determine whether the database entity is usable to process requests from the client; and in response to the client determining that the database entity has a ready status, receiving a third request from the client to perform an operation with respect to the database entity. 9. The medium of claim 8 , wherein the first request specifies a minimum schema version to be used in processing the first request, and wherein the operations further comprise: detecting that a schema cached in an in-memory cache of the computer system does not satisfy the minimum schema version; and replacing, in the in-memory cache, the cached schema with the updated schema. 10. The medium of claim 8 , wherein the operations further comprise: receiving another request to perform an operation on a different one of the plurality of records, wherein the other request does not specify a minimum schema version; and performing the operation of the other request on the different record without upgrading the different record, wherein the different record corresponds to an earlier schema version than the version of the updated schema. 11. The medium of claim 8 , wherein performing the requested operation includes deleting the upgraded record from the database. 12. The medium of claim 8 , wherein the operations further comprise: subsequent to the set of processes performing the upgrade routine, instantiating a set of scrutiny processes to determine whether ones of the plurality of records have been upgraded to comply with the updated schema. 13. A system, comprising: at least one processor; and memory having program instructions stored thereon that are executable by the at least one process to cause the system to perform operations comprising: receiving a metadata document that describes an updated schema for a database that stores a plurality of records, wherein the updated schema describes a set of database entities and a corresponding set of statuses; receiving, from a client, a first request to perform an operation on one of the plurality of records; detecting that the record corresponds to an earlier schema version than a version of the updated schema of the metadata document; upgrading the record to comply with the updated schema; after upgrading the record, performing the requested operation on the record; in response to receiving a second request from the client for a status of a database entity associated with the updated schema, returning a response indicating the status of the database entity to allow the client to determine whether the database entity is usable to process requests from the client; setting, when upgrading the database entity, the status of the database entity to indicate that the database entity is being upgraded; and after the database entity has a ready status, receiving a third request from the client to perform an operation with respect to the database entity. 14. The system of claim 13 , wherein the first request specifies a minimum schema version, and wherein the operations further comprise: determining that a version of a schema fo

Assignees

Inventors

Classifications

  • G06F16/213Primary

    with details for schema evolution support · CPC title

  • Tablespace storage structures; Management thereof · CPC title

  • Change logging, detection, and notification (replication G06F16/27) · CPC title

  • Database cache management · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11940963B2 cover?
Techniques are disclosed relating to database schemas. A computer system may receive a metadata document that describes an updated schema for a database that stores a plurality of records. The computer system may instantiate a set of processes to perform an upgrade routine to upgrade ones of the plurality of records to comply with the updated schema. While the set of processes are upgrading the…
Who is the assignee on this patent?
Salesforce Com Inc, Salesforce Inc
What technology area does this patent fall under?
Primary CPC classification G06F16/213. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Mar 26 2024 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 10 related publications on this page (citations in our corpus or others sharing the same primary CPC).