主权项 |
1. A method comprising:
maintaining, in a persistent storage, a database that is accessible to a plurality of database server instances; wherein the database includes a table that is physically organized in a plurality of units, wherein each unit of the plurality of units is stored in persistent storage and comprises one or more contiguous rows of the table stored in row-major format; generating, in a first volatile memory local to a first database server instance of the plurality of database server instances, a first in-memory copy of a first chunk of the table; wherein the first in-memory copy of the first chunk of the table comprises one or more columns from one or more units of the plurality of units in column-major format; acquiring, by the first database server instance, a first lock that covers a particular unit of the plurality of units; receiving, at the first database server instance, a first request to release the first lock; in response to receiving the first request, releasing the first lock, and in response to releasing the first lock, storing, in the first volatile memory, a first indication that each row in the first in-memory copy of the first chunk that is also generated from the particular unit is invalid; wherein the first database server instance responds to requests to read data from the first chunk by:
obtaining data items, that belong to the first chunk and that have not been invalidated in the first in-memory copy, from the first in-memory copy; andobtaining data items, that belong to the first chunk and have been invalidated in the first in-memory copy, from a source other than the first in-memory copy; wherein the method is performed by one or more computing devices. |