Mirroring file data
AssigneeMicrosoft Corporation
InventorsPradeep Jnana Madhavarapu, Priyak Porwal, Vaibhav Kamra, Alexandru C. Chirica, Cristian Diaconu, Jun Fang, Srinivasmurthy P. Acharya
Life of this patent
Estimating the term…
Abstract
The present invention extends to methods, systems, and computer program products for mirroring file data. Generally, high availability and disaster recovery (“HADRON”) is achieved within a database management system by detecting which parts of a file have changed and sending the changed parts to secondaries. Adjacent or partially overlapping parts of a file can coalesce to form larger chunks of changed data. Coalescing reduces the overall number of chunks that are tracked.
Claims20
At a database server including one or more processors and system memory, the database server connected to one or more secondary database servers via a network, the database server also including a database, a file system, and a transaction log, the file system storing file system data separate from a main database file of the database, the transaction log for logging operations that occur at the database server, a method for mirroring changes to file system data to the one or more secondary database servers, the method comprising:
- an act of intercepting a file command directed to a portion of a file stored in the file system, the file command including a filename, an offset, and a size, the file name identifying the name of the file, the size and offset representing a portion of the file that is to change, the offset indicating a position within the file, the size representing how much data starting from the position and moving towards the end of the file is to change;
- an act of coalescing the offset and size with offsets and sizes from other intercepted file commands for the file into a sequence of one or more data blocks representing portions of the file;
- an act of writing a size and offset for each of the one or more data blocks into the transaction log to identify the portion of the file that is to change;
- for each of the one or more data blocks, subsequent to writing a size and offset for each of the one or more data blocks into the transaction log:
- an act of reading the size and offset for the data block from the transaction log;
- an act of accessing the portion of data identified by the offset and size from within the file;
- an act of sending the portion of the file to the one or more secondary database servers;
- and
- an act of sending the portion of the transaction log containing the size and offset for the data block to the one or more secondary servers subsequent to sending the portion of the file to the one or more secondary database servers.
At a database server including one or more processors and system memory, the database server connected to one or more secondary database servers via a network, the database server also including a database, a file system, and a transaction log, the file system storing file system data separate from a main database file of the database, the transaction log for logging operations that occur at the database server, a method for mirroring changes to file system data to the one or more secondary database servers, the method comprising:
- an act of intercepting a file command directed to a file stored in the file system, the file command including a filename, an offset, and a size, the file name identifying the name of the file, the size and offset representing a portion of the file that is to change, the offset indicating a position within the file, the size representing how much data starting from the position and moving towards the end of the file is to change;
- an act of writing the size and offset for from the intercepted file command the transaction log to identify the portion of the file that is to change;
- an act of detecting a file close for the file subsequent to writing the size and offset for file command into the transaction log;
- in response to detecting the file close for the file:
- an act of reading the size and offset for the file command from the transaction log;
- an act of accessing the portion of data identified by the offset and size from within the file;
- an act of sending the portion of the file to the one or more secondary database servers;
- and
- an act of sending the portion of the transaction log containing the size and offset from the file command to the one or more secondary database servers subsequent to sending the portion of the file to the one or more secondary database servers.
A computer program product for use at a database server including one or more processors and system memory, the database server connected to one or more secondary database servers via a network, the database server also including a database, a file system, and a transaction log, the file system storing file system data separate from a main database file of the database, the transaction log for logging operations that occur at the database server, the computer program product for implementing a method for mirroring changes to file system data to the one or more secondary database servers, the computer program product comprising one or more computer storage devices having stored thereon computer-executable instructions that, when executed at a processor, cause the database server to implement the method including the following:
- an act of intercepting a file command directed to a portion of Binary Large Object (“BLOB”) data in the file system, the file command including a filename, an offset, and a size, the file name identifying the name of the BLOB data, the size and offset representing a portion of the BLOB data that is to change, the offset indicating a position within the BLOB data, the size representing how much data starting from the position and moving towards the end of the BLOB data is to change;
- an act of coalescing the offset and size with offsets and sizes from other intercepted file commands for the BLOB data into a sequence of one or more data blocks representing portions of the BLOB data;
- an act of writing a size and offset for each of the one or more data blocks into the transaction log to identify the portion of the BLOB data that is to change;
- for each of the one or more data blocks, subsequent to writing a size and offset for each of the one or more data blocks into the transaction log and in response to a file close command:
- an act of reading the size and offset for the data block from the transaction log;
- an act of accessing the portion of data identified by the offset and size from within the BLOB data;
- an act of sending the portion of the BLOB data to the one or more secondary database servers;
- and
- an act of sending the portion of the transaction log containing the size and offset for the data block to the one or more secondary servers subsequent to sending the portion of the BLOB data to the one or more secondary database servers.
Dependencies are inferred from the claim text.