# US 2023/0409431 A1 · Data replication with cross replication group references

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

- Number: US 2023/0409431 A1
- Document ID: US20230409431A1
- Status: Published application
- Kind: A1
- Application number: 18/349,688
- Filed: 2023-07-10
- Published: 2023-12-21
- Earliest claimed: 2022-06-11
- Assignees: Snowflake Inc.
- Applicants: Snowflake Inc.
- Inventors: Robert Bengt Benedikt Gernhardt; Nithin Mahesh; Sahaj Saini; Matthew Uhlar
- Web page: https://patentgrep.com/patent/US20230409431A1

## CPC

- G06F 11/1435: {using file system or storage system metadata}
- G06F 16/273: {Asynchronous replication or reconciliation}
- G06F 11/2094: {Redundant storage or storage space (G06F11/2056 takes precedence)}
- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F 16/256: {in federated or virtual databases}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 2201/84: Using snapshots, i.e. a logical point-in-time copy of the data
- H04L 67/1095: Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

This disclosure provides methods and techniques of data replication involving cross replication group (RG) references. The present disclosure avoids automatic replication failing when an entity in an RG refers to another entity external to the RG. The entity to be replicated within the RG is referred to as the “referring entity,” and the entity as the dangling reference is referred to as the “referred entity.” Although the referring and referred entities are not replicated together in a replication operation, the referred entity may have already been replicated to the target account in another replication operation on a different replication group. In such cases, the data replication procedure may, according to aspects of the present disclosure, check if the referred entity has already been replicated, and if so, proceed to replicate the referring entity without fail, and link the referring and referred entities to enable normal functioning of the referring entity.

## Claims

### Claim 1

A method of replicating an internal entity in a first database region to a second database region, the method comprising:
identifying an association between the internal entity in a first replication group and an external entity outside of the first replication group;
recording the identified association in a replication metadata of the internal entity, wherein the replication metadata comprises relationship information between the internal entity and other entities that enable proper functions of the internal entity, the other entities including the external entity; and
replicating, by a processing device based on the replication metadata when one or more conditions are satisfied, the internal entity in a replicated group in the second database region as a replicated entity associated with the external entity outside of the first replication group.

### Claim 2 (depends on 1)

The method of claim 1, wherein the association comprises a first global identifier for the internal entity and a second global identifier for the external entity.

### Claim 3 (depends on 1)

The method of claim 1, wherein the other entities further comprise a plurality of other internal entities located in the first replication group.

### Claim 4 (depends on 1)

The method of claim 1, wherein replicating the internal entity in the replicated group in the second database region comprises:
replicating the plurality of the other internal entities in the first replication group into the replicated group.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
receiving a request to replicate the first replication group in the first database region; and
capturing, in response to the request received, a snapshot of the first replication group in the first database region, wherein the snapshot comprises the replication metadata and data to match the replicated entity in the replicated group to the internal entity in the first replication group.

### Claim 6 (depends on 1)

The method of claim 1, wherein:
the internal entity or the external entity comprises at least one of: an account, a database, a file, or an object, and
the association between the internal entity and the external entity is identified based on at least one of: a table, a masking policy, a row access policy, a materialized view, a sequence, or a tag; and wherein the external entity is a dangling reference to the internal entity such that the external entity and the internal entity belong to different reference groups.

### Claim 7 (depends on 6)

The method of claim 6, wherein the replicated entity is associated with the external entity outside of the first replication group via a replica of the external entity, wherein the replica of the external entity resides in the second database region and outside of the replicated group and wherein the external entity resides in a second replication group in the first database region.

### Claim 8 (depends on 2)

The method of claim 2, wherein the one or more conditions comprise at least:
a determination by the processing device that the association between the internal entity and the external entity is free from security threats or breach as indicated by a lack of masking or row access in the replication metadata; and wherein replicating the internal entity in the second database region as the replicated entity further comprises:
retrieving the second global identifier for the external entity from a snapshot captured for replicating the first replication group in the first database region, the snapshot comprising the replication metadata and data required to synchronize the replicated entity in the replicated group to the internal entity in the first replication group.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
upon determining that the one or more conditions are not satisfied, terminating replication of the internal entity in the second database region; and
providing a notice to a user regarding the termination.

### Claim 10 (depends on 8)

The method of claim 8, further comprising:
upon determining that the one or more conditions are not satisfied, reporting, to a user, a notification of a disruption of the replication of the internal entity, wherein the notification comprises operation options, wherein the operation options comprise at least one of:
(1) removal of the association between the internal entity in the first replication group and the external entity outside of the first replication group; or
(2) proceeding with replication of the internal entity in the second database region;
receiving, from the user, a selection of the operation options;
executing the selection of the operation options;
upon executing the selection of operation options comprising proceeding with replication of the internal entity in the second database region, replicating a replica of the external entity; and
associating the replica of the external entity and the internal entity in the second database region based on respective global identifiers.

### Claim 11

A system of replicating an internal entity in a first database region to a second database region, the system comprising:
a memory; and
one or more processors operatively coupled to the memory, the one or more processors to:
identify an association between the internal entity in a first replication group and an external entity outside of the first replication group;
record the identified association in a replication metadata of the internal entity, wherein the replication metadata comprises relationship information between the internal entity and other entities that enable proper functions of the internal entity, the other entities including the external entity; and
replicate, by a processing device based on the replication metadata when one or more conditions are satisfied, the internal entity in a replicated group in the second database region as a replicated entity associated with the external entity outside of the first replication group.

### Claim 12 (depends on 11)

The system of claim 11, wherein the one or more processors are further to:
receive a request to replicate the first replication group in the first database region; and
capture, in response to the request received, a snapshot of the first replication group in the first database region, wherein the snapshot comprises the replication metadata and data to match the replicated entity in the replicated group to the internal entity in the first replication group.

### Claim 13 (depends on 11)

The system of claim 11, wherein the internal entity or the external entity comprises at least one of: an account, a database, a file, or an object.

### Claim 14 (depends on 13)

The system of claim 13, wherein the association between the internal entity and the external entity is identified based on at least one of: a table, a masking policy, a row access policy, a materialized view, a sequence, or a tag; and wherein the external entity is a dangling reference to the internal entity such that the external entity and the internal entity belong to different reference groups.

### Claim 15 (depends on 13)

The system of claim 13, wherein the replicated entity is associated with the external entity outside of the first replication group via a replica of the external entity, wherein the replica of the external entity resides in the second database region and outside of the replicated group and wherein the external entity resides in a second replication group in the first database region.

### Claim 16

A non-transitory computer-readable medium having instructions stored thereon which, when executed by one or more processors, causes the one or more processors to replicate an internal entity in a first database region to a second database region by:
identifying an association between the internal entity in a first replication group and an external entity outside of the first replication group;
recording the identified association in a replication metadata of the internal entity, wherein the replication metadata comprises relationship information between the internal entity and other entities that enable proper functions of the internal entity, the other entities including the external entity; and
replicating, by a processing device based on the replication metadata when one or more conditions are satisfied, the internal entity in a replicated group in the second database region as a replicated entity associated with the external entity outside of the first replication group.

### Claim 17 (depends on 16)

The non-transitory computer-readable medium of claim 16, wherein the association comprises a first global identifier for the internal entity and a second global identifier for the external entity.

### Claim 18 (depends on 16)

The non-transitory computer-readable medium of claim 16, wherein the other entities further comprise a plurality of other internal entities located in the first replication group.

### Claim 19 (depends on 16)

The non-transitory computer-readable medium of claim 16, wherein the one or more processors are further to:
receive a request to replicate the first replication group in the first database region; and
capture, in response to the request received, a snapshot of the first replication group in the first database region, wherein the snapshot comprises the replication metadata and data to match the replicated entity in the replicated group to the internal entity in the first replication group.

### Claim 20 (depends on 19)

The non-transitory computer-readable medium of claim 19, wherein the internal entity or the external entity comprises at least one of: an account, a database, a file, or an object.
