# US 2014/0195489 A1 · Logical replication in clustered database system with adaptive cloning

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2014/0195489 A1
- Document ID: US20140195489A1
- Status: Published application
- Kind: A1
- Application number: 14/159,640
- Filed: 2014-01-21
- Published: 2014-07-10
- Earliest claimed: 2010-04-12
- Assignees: Microsoft Corporation
- Applicants: Microsoft Corporation
- Inventors: Rui Wang; Michael E. Habben; Qun Guo; Peter Byrne; Robin D. Dhamankar; Vishal Kathuria; Mahesh K. Sreenivas; Yixue Zhu; Xiaowei Jiang
- Web page: https://patentgrep.com/patent/US20140195489A1

## CPC

- G06F 16/219: {Managing data history or versioning (querying versioned data G06F16/2474; querying temporal data G06F16/2477)}
- G06F 9/466: {Transaction processing}
- G06F 11/2041: {with more than one idle spare processing component}
- G06F 11/2048: {where the redundant components share neither address space nor persistent storage}
- G06F 11/2097: {maintaining the standby controller/processing unit updated (initialisation or re-synchronisation thereof G06F11/1658 and subgroups)}
- G06F 16/273: {Asynchronous replication or reconciliation}
- G06F 2201/80: Database-specific techniques
- G06F 2201/82: Solving problems relating to consistency
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Architecture that addresses an end-to-end solution for logical transactional replication from a shared-nothing clustered database management system, which uses adaptive cloning for high availability. This can be time based using a global logical timestamp. The disclosed architecture, used for refreshing stale clones, does not preserve user transaction boundaries, which is a more complex situation than where the boundaries are preserved. In such a scenario it is probable that for a given data segment no clone of the segment may contain the complete user transaction history, and hence, the history has to be pieced together from the logs of multiple different clones. This is accomplished such that log harvesting is coordinated with the clone state transitions to ensure the correctness of logical replication.

## Claims

### Claim 1

A computer-implemented database management method performed by a computer system executing machine-readable instructions, the method comprising acts of:
storing database segments of a database as primary clones across cluster nodes;
maintaining redundant copies of the database segments as secondary clones; and
when refreshing a stale secondary clone, only when it is determined that a degree of staleness of the stale secondary clone is above a predetermined threshold, rebuilding the stale secondary clone in its entirety.

### Claim 2 (depends on 1)

The method of claim 1, wherein when refreshing the stale secondary clone, when it is determined that a degree of staleness of the stale secondary clone is not above a predetermined threshold, refreshing of the stale secondary clone is not accomplished by replaying an associated transaction log.

### Claim 3 (depends on 1)

The method of claim 1, wherein when refreshing the stale secondary clone, when it is determined that a degree of staleness of the stale secondary clone is not above a predetermined threshold, refreshing of the stale secondary clone is performed without preserving user transaction boundaries.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
receiving multiple transaction log streams based on global logical timestamps of commit processes employed in the cluster; and
merging the received multiple transaction log streams into a single change stream which is then provided as a single stream of ordered changes to a destination data system.

### Claim 5 (depends on 4)

The method of claim 4, wherein at least one of the transaction log streams lacks a complete record of changes.

### Claim 6 (depends on 5)

The method of claim 5, wherein merging the received multiple transaction log streams is coordinated with clone state transitions to facilitate correctness of logical replication.

### Claim 7 (depends on 1)

The method of claim 1, wherein one and only one clone of each data segment is assigned as the primary clone.

### Claim 8

A computer-implemented database management system having computer readable media that store executable instructions executed by a processor, comprising:
a database storing database segments as primary clones across cluster nodes and redundant copies of the database segments maintained as secondary clones; and
a replication component that refreshes a stale secondary clone and only when it is determined that a degree of staleness of the stale secondary clone is above a predetermined threshold, rebuilds the stale secondary clone in its entirety.

### Claim 9 (depends on 8)

The system of claim 8, wherein when refreshing the stale secondary clone, when it is determined that a degree of staleness of the stale secondary clone is not above a predetermined threshold, refreshing of the stale secondary clone is not accomplished by replaying an associated transaction log.

### Claim 10 (depends on 8)

The system of claim 8, wherein when refreshing the stale secondary clone, when it is determined that a degree of staleness of the stale secondary clone is not above a predetermined threshold, refreshing of the stale secondary clone is performed without preserving user transaction boundaries.

### Claim 11 (depends on 8)

The system of claim 8, the replication component further receives multiple transaction log streams based on global logical timestamps of commit processes employed in the cluster; and merges the received multiple transaction log streams into a single change stream which is then provided as a single stream of ordered changes to a destination data system.

### Claim 12 (depends on 11)

The system of claim 11, wherein at least one of the transaction log streams lacks a complete record of changes.

### Claim 13 (depends on 12)

The system of claim 12, wherein the replication component merges the received multiple transaction log streams by coordinating with clone state transitions to facilitate correctness of logical replication.

### Claim 14 (depends on 8)

The system of claim 8, wherein one and only one clone of each data segment is assigned as the primary clone.

### Claim 15

A computer-readable storage memory having computer-executable instructions, which when executed perform actions, comprising:
storing database segments of a database as primary clones across cluster nodes;
maintaining redundant copies of the database segments as secondary clones; and
when refreshing a stale secondary clone, only when it is determined that a degree of staleness of the stale secondary clone is above a predetermined threshold, rebuilding the stale secondary clone in its entirety.

### Claim 16 (depends on 15)

The computer-readable storage memory of claim 15, wherein when refreshing the stale secondary clone, when it is determined that a degree of staleness of the stale secondary clone is not above a predetermined threshold, refreshing of the stale secondary clone is not accomplished by replaying an associated transaction log.

### Claim 17 (depends on 15)

The computer-readable storage memory of claim 15, wherein when refreshing the stale secondary clone, when it is determined that a degree of staleness of the stale secondary clone is not above a predetermined threshold, refreshing of the stale secondary clone is performed without preserving user transaction boundaries.

### Claim 18 (depends on 15)

The computer-readable storage memory of claim 15, further comprising computer-executable instructions, which when executed perform actions, comprising:
receiving multiple transaction log streams based on global logical timestamps of commit processes employed in the cluster; and
merging the received multiple transaction log streams into a single change stream which is then provided as a single stream of ordered changes to a destination data system.

### Claim 19 (depends on 18)

The computer-readable storage memory of claim 18, wherein at least one of the transaction log streams lacks a complete record of changes.

### Claim 20 (depends on 19)

The computer-readable storage memory of claim 19, wherein merging the received multiple transaction log streams is coordinated with clone state transitions to facilitate correctness of logical replication.
