# US 2025/0094289 A1 · Transactional access to resource repositories

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

- Number: US 2025/0094289 A1
- Document ID: US20250094289A1
- Status: Published application
- Kind: A1
- Application number: 18/368,378
- Filed: 2023-09-14
- Published: 2025-03-20
- Earliest claimed: 2023-09-14
- Assignees: GitLab Inc.
- Applicants: GitLab Inc.
- Inventors: Sami Hiltunen
- Web page: https://patentgrep.com/patent/US20250094289A1

## CPC

- G06F 11/1458: {Management of the backup or restore process}
- G06F 9/466: {Transaction processing}
- G06F 16/128: {Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion (error detection or correction of the data by redundancy in operations or in hardware G06F11/14, G06F11/16)}
- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Resources, like source code, can be stored in a repository and managed through a resource repository system. The resource repository system includes a processor and a memory for storing a plurality of data structures, each data structure comprising a current version of a corresponding resource and at least one past version of the corresponding resource. The processor is communicatively coupled to the memory and configured to: request a transaction on a resource of a repository; create a snapshot of the repository; perform reads and/or writes of the transaction against the snapshot; evaluate potential conflicts between concurrently committed transactions; if no conflict is found, commit the transaction by persisting it to a write-ahead log; and update the repository based on the write-ahead log.

## Claims

### Claim 1

A resource repository system comprising:
a memory for storing a plurality of data structures, each data structure comprising a current version of a corresponding resource and at least one past version of the corresponding resource;
a processor communicatively coupled to the memory and configured to:
receive a request for a transaction on a resource of a repository, the transaction making one or more changes to the resource of the repository;
create a snapshot of the repository by:
copying a directory structure of the repository into a temporary directory and hard linking resources of the repository to the temporary directory; or
using a copy-on-write functionality of a filesystem to create a clone of the repository into a temporary directory;
perform reads and/or writes of the transaction on the snapshot;
evaluate potential conflicts between the reads and/or the writes of the transaction and those of other concurrently committed transactions;
responsive to no conflict being found, commit the transaction to a write-ahead log; and
update the repository based on the changes recorded in the write-ahead log.

### Claim 2 (depends on 1)

The system of claim 1, wherein the processor is configured to commit the transaction to the write-ahead log by:
creating a log entry containing the changes to be committed with the transaction; and
persisting the log entry into the write-ahead log.

### Claim 3 (depends on 2)

The system of claim 2, wherein the processor is configured to update the repository by:
reading a transaction's changes from the write-ahead log; and
based on the changes of the transaction, applying the transaction to the repository by performing the recorded changes.

### Claim 4 (depends on 1)

The system of claim 1, wherein the processor is configured to delete the snapshot after committing the transaction to the write-ahead log.

### Claim 5 (depends on 1)

The system of claim 1, wherein evaluating the potential conflicts comprises
checking transactions logged in the write-ahead log to determine whether the resource is changed by a concurrent transaction that committed concurrently against the repository.

### Claim 6 (depends on 1)

The system of claim 1, wherein the processor is configured to block writes into the repository while one or more snapshots are created to maintain consistency.

### Claim 7 (depends on 1)

The system of claim 1, wherein if a crash occurs while one or more transactions have been committed to the write-ahead log but not yet fully applied to the repository, the processor is configured to recover committed transactions from the write-ahead log and update the repository accordingly.

### Claim 8 (depends on 1)

The system of claim 1, wherein if a conflict is found, the processor is configured to discard the transaction and delete the snapshot associated with the transaction.

### Claim 9 (depends on 1)

The system of claim 1, wherein the processor is configured to provide an alert associated with the conflict if found.

### Claim 10

(canceled)

### Claim 11

A method for performing a transaction on a resource on a database, the method comprising:
receiving a request for a transaction on a resource of a repository, the transaction making one or more changes to the resource of the repository;
creating a snapshot of the repository by:
copying a directory structure of the repository into a temporary directory and hard linking resources of the repository to the temporary directory; or
using a copy-on-write functionality of a filesystem to create a clone of the repository into a temporary directory;
performing reads and/or writes of the transaction on the snapshot;
evaluating potential conflicts between the reads and/or the writes of the transaction and those of other concurrently committed transactions;
responsive to no conflict being found, committing the transaction to a write-ahead log; and
updating the repository based on the changes recorded in the write-ahead log.

### Claim 12 (depends on 11)

The method of claim 11, wherein committing the transaction to the write-ahead log comprises:
creating a log entry containing the changes to be committed with the transaction; and
persisting the log entry into the write-ahead log.

### Claim 13 (depends on 12)

The method of claim 12, wherein updating the repository comprises:
reading a transaction's changes from the write-ahead log; and
based on the changes of the transaction, applying the transaction to the repository by performing the recorded changes.

### Claim 14 (depends on 11)

The method of claim 11, further comprises deleting the snapshot after committing the transaction to the write-ahead log.

### Claim 15 (depends on 11)

The method of claim 11, wherein evaluating the potential conflicts comprises checking transactions logged in the write-ahead log to determine whether the resource is changed by a concurrent transaction that committed concurrently against the repository.

### Claim 16 (depends on 11)

The method of claim 11, further comprising blocking writes into the repository while one or more snapshots are created to maintain consistency.

### Claim 17 (depends on 11)

The method of claim 11, further comprising, if a crash occurs while one or more transactions have been committed to the write-ahead log but not yet fully applied to the repository, recovering committed transactions from the write-ahead log and update the repository accordingly.

### Claim 18 (depends on 11)

The method of claim 11, further comprising, if a conflict is found, discarding the transaction and delete the snapshot associated with the transaction.

### Claim 19

(canceled)

### Claim 20

A computer program product comprising a non-transitory computer readable storage medium having instructions encoded thereon that, when executed by a computing system, cause the computing system to perform operations including:
receiving a request for a transaction on a resource of a repository, the transaction making one or more changes to the resource of the repository;
creating a snapshot of the repository by:
copying a directory structure of the repository into a temporary directory and hard linking resources of the repository to the temporary directory; or
using a copy-on-write functionality of a filesystem to create a clone of the repository into a temporary directory;
performing reads and/or writes of the transaction on the snapshot;
evaluating potential conflicts between the reads and/or the writes of the transaction and those of other concurrently committed transactions;
responsive to no conflict is being found, committing the transaction to a write-ahead log; and
updating the repository based on the changes recorded in the write-ahead log.

### Claim 21 (depends on 20)

The computer program product of claim 20, wherein:
committing the transaction to the write-ahead log comprises:
creating a log entry containing the changes to be committed with the transaction; and
persisting the log entry into the write-ahead log; and
updating the repository comprises:
reading a transaction's changes from the write-ahead log; and
based on the changes of the transaction, applying the transaction to the repository by performing the recorded changes.

### Claim 22 (depends on 20)

The computer program product of claim 20, wherein if a crash occurs while one or more transactions have been committed to the write-ahead log but not yet fully applied to the repository, the operations further include recovering committed transactions from the write-ahead log and update the repository accordingly.
