Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f96092a
Move file to 3.15
josh-wong Jun 20, 2025
a066f26
Update version
josh-wong Jun 20, 2025
a8783f2
Add 3.15
josh-wong Jun 20, 2025
d32e24f
Create version-3.15-sidebars.json
josh-wong Jun 20, 2025
cdacd8a
Create version-3.15.json
josh-wong Jun 20, 2025
1fed2ea
Create 3.16.tsx
josh-wong Jun 20, 2025
3d10d6b
Create 3.16.tsx
josh-wong Jun 20, 2025
ba2b85a
Create index.mdx
josh-wong Jun 20, 2025
1c41a33
Create index.mdx
josh-wong Jun 20, 2025
56843dc
Fix links; remove asterisks
josh-wong Jun 20, 2025
ce89e8b
Create placeholder draft of release-notes.mdx
josh-wong Jun 20, 2025
d6bd22a
Create placeholder draft of release-notes.mdx
josh-wong Jun 20, 2025
b10e173
Create release-support-policy.mdx
josh-wong Jun 20, 2025
4ccc496
Create release-support-policy.mdx
josh-wong Jun 20, 2025
5c9693b
Add `3.16` as `latest`; change `3.15` to number
josh-wong Jun 20, 2025
56476a9
Add announcement for 3.16 release
josh-wong Jun 20, 2025
1a19b3d
Add `3.15` to `allowedLanguageDropdownVersions`
josh-wong Jun 20, 2025
db172db
Update support dates for 3.16 and 3.15
josh-wong Jun 23, 2025
ebc9391
Merge branch 'main' into prepare-version-3.16
josh-wong Jun 24, 2025
853a69f
Merge branch 'main' into prepare-version-3.16
josh-wong Jun 24, 2025
be961ce
Add release notes for 3.16.0
josh-wong Jun 24, 2025
20e494b
Merge branch 'main' into prepare-version-3.16
josh-wong Jun 24, 2025
3dcc0a1
Merge branch 'main' into prepare-version-3.16
josh-wong Jun 24, 2025
630510d
Add patch version release notes for 3.15.4
josh-wong Jun 24, 2025
4bfa964
Merge branch 'main' into prepare-version-3.16
josh-wong Jun 25, 2025
964267e
Merge branch 'main' into prepare-version-3.16
josh-wong Jun 25, 2025
cc5dddf
Remove misplaced feature
josh-wong Jul 8, 2025
582e55b
Rename `semi-synchronous replication` to `remote replication`
josh-wong Jul 8, 2025
2f1899a
Merge branch 'main' into prepare-version-3.16
josh-wong Jul 10, 2025
3de4f5d
Apply redesign done in #1346
josh-wong Jul 10, 2025
2929386
Remove misplaced feature
josh-wong Jul 10, 2025
fb27f7e
Add placeholder for new blog posts
josh-wong Jul 10, 2025
0b756b1
Change message from release note link to IBM Db2 info
josh-wong Jul 10, 2025
d271b25
Add doc for 3.16
josh-wong Jul 10, 2025
49dd518
Add Data Loader and Schema Loader error code docs
josh-wong Jul 10, 2025
c1ec591
Match version home page redesign from #1346
josh-wong Jul 10, 2025
bfb7d8a
Specify Db2 in link
josh-wong Jul 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
86 changes: 78 additions & 8 deletions docs/api-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,14 @@ DistributedTransaction transaction = transactionManager.start();
Alternatively, you can use the `begin` method for a transaction by specifying a transaction ID as follows:

```java
// Begin a transaction with specifying a transaction ID.
// Begin a transaction by specifying a transaction ID.
DistributedTransaction transaction = transactionManager.begin("<TRANSACTION_ID>");
```

Or, you can use the `start` method for a transaction by specifying a transaction ID as follows:

```java
// Start a transaction with specifying a transaction ID.
// Start a transaction by specifying a transaction ID.
DistributedTransaction transaction = transactionManager.start("<TRANSACTION_ID>");
```

Expand All @@ -389,6 +389,48 @@ When you specify a transaction ID, make sure you specify a unique ID (for exampl

:::

##### Begin or start a transaction in read-only mode

You can also begin or start a transaction in read-only mode. In this case, the transaction will not allow any write operations, and it will be optimized for read operations.

:::note

Using read-only transactions for read-only operations is strongly recommended to improve performance and reduce resource usage.

:::

You can begin or start a transaction in read-only mode as follows:

```java
// Begin a transaction in read-only mode.
DistributedTransaction transaction = transactionManager.beginReadOnly();
```

```java
// Start a transaction in read-only mode.
DistributedTransaction transaction = transactionManager.startReadOnly();
```

Alternatively, you can use the `beginReadOnly` and `startReadOnly` methods by specifying a transaction ID as follows:

```java
// Begin a transaction in read-only mode by specifying a transaction ID.
DistributedTransaction transaction = transactionManager.beginReadOnly("<TRANSACTION_ID>");
```

```java
// Start a transaction in read-only mode by specifying a transaction ID.
DistributedTransaction transaction = transactionManager.startReadOnly("<TRANSACTION_ID>");
```

:::note

Specifying a transaction ID is useful when you want to link external systems to ScalarDB. Otherwise, you should use the `beginReadOnly()` method or the `startReadOnly()` method.

When you specify a transaction ID, make sure you specify a unique ID (for example, UUID v4) throughout the system since ScalarDB depends on the uniqueness of transaction IDs for correctness.

:::

#### Join a transaction

Joining a transaction is particularly useful in a stateful application where a transaction spans multiple client requests. In such a scenario, the application can start a transaction during the first client request. Then, in subsequent client requests, the application can join the ongoing transaction by using the `join()` method.
Expand Down Expand Up @@ -629,9 +671,14 @@ If the result has more than one record, `transaction.get()` will throw an except

##### `Scan` operation

`Scan` is an operation to retrieve multiple records within a partition. You can specify clustering-key boundaries and orderings for clustering-key columns in `Scan` operations.
`Scan` is an operation to retrieve multiple records within a partition. You can specify clustering-key boundaries and orderings for clustering-key columns in `Scan` operations. To execute a `Scan` operation, you can use the `transaction.scan()` method or the `transaction.getScanner()` method:

- `transaction.scan()`:
- This method immediately executes the given `Scan` operation and returns a list of all matching records. It is suitable when the result set is expected to be small enough to fit in memory.
- `transaction.getScanner()`:
- This method returns a `Scanner` object that allows you to iterate over the result set lazily. It is useful when the result set may be large, as it avoids loading all records into memory at once.

You need to create a `Scan` object first, and then you can execute the object by using the `transaction.scan()` method as follows:
You need to create a `Scan` object first, and then you can execute the object by using the `transaction.scan()` method or the `transaction.getScanner()` method as follows:

```java
// Create a `Scan` operation.
Expand All @@ -652,8 +699,17 @@ Scan scan =
.limit(10)
.build();

// Execute the `Scan` operation.
// Execute the `Scan` operation by using the `transaction.scan()` method.
List<Result> results = transaction.scan(scan);

// Or, execute the `Scan` operation by using the `transaction.getScanner()` method.
try (TransactionCrudOperable.Scanner scanner = transaction.getScanner(scan)) {
// Fetch the next result from the scanner
Optional<Result> result = scanner.one();

// Fetch all remaining results from the scanner
List<Result> allResults = scanner.all();
}
```

You can omit the clustering-key boundaries or specify either a `start` boundary or an `end` boundary. If you don't specify `orderings`, you will get results ordered by the clustering order that you defined when creating the table.
Expand Down Expand Up @@ -1292,9 +1348,14 @@ For details about the `Get` operation, see [`Get` operation](#get-operation).

#### Execute `Scan` operation

`Scan` is an operation to retrieve multiple records within a partition. You can specify clustering-key boundaries and orderings for clustering-key columns in `Scan` operations.
`Scan` is an operation to retrieve multiple records within a partition. You can specify clustering-key boundaries and orderings for clustering-key columns in `Scan` operations. To execute a `Scan` operation, you can use the `transactionManager.scan()` method or the `transactionManager.getScanner()` method:

- `transactionManager.scan()`:
- This method immediately executes the given `Scan` operation and returns a list of all matching records. It is suitable when the result set is expected to be small enough to fit in memory.
- `transactionManager.getScanner()`:
- This method returns a `Scanner` object that allows you to iterate over the result set lazily. It is useful when the result set may be large, as it avoids loading all records into memory at once.

You need to create a `Scan` object first, and then you can execute the object by using the `transactionManager.scan()` method as follows:
You need to create a `Scan` object first, and then you can execute the object by using the `transactionManager.scan()` method or the `transactionManager.getScanner()` method as follows:

```java
// Create a `Scan` operation.
Expand All @@ -1314,8 +1375,17 @@ Scan scan =
.limit(10)
.build();

// Execute the `Scan` operation.
// Execute the `Scan` operation by using the `transactionManager.scan()` method.
List<Result> results = transactionManager.scan(scan);

// Or, execute the `Scan` operation by using the `transactionManager.getScanner()` method.
try (TransactionManagerCrudOperable.Scanner scanner = transactionManager.getScanner(scan)) {
// Fetch the next result from the scanner
Optional<Result> result = scanner.one();

// Fetch all remaining results from the scanner
List<Result> allResults = scanner.all();
}
```

For details about the `Scan` operation, see [`Scan` operation](#scan-operation).
Expand Down
6 changes: 6 additions & 0 deletions docs/backup-restore.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ The backup methods by database listed below are just examples of some of the dat
<TabItem value="YugabyteDB_Managed" label="YugabyteDB Managed">
Clusters are backed up automatically based on the backup policy, and these backups are retained for a specific duration. You can also perform on-demand backups. For details on performing backups, see [YugabyteDB Managed: Back up and restore clusters](https://docs.yugabyte.com/preview/yugabyte-cloud/cloud-clusters/backup-clusters/).
</TabItem>
<TabItem value="Db2" label="Db2">
Use the `backup` command. For details, on performing backups, see [Db2: Backup overview](https://www.ibm.com/docs/en/db2/12.1.0?topic=recovery-backup).
</TabItem>
</Tabs>

### Back up with explicit pausing
Expand Down Expand Up @@ -175,4 +178,7 @@ The restore methods by database listed below are just examples of some of the da
<TabItem value="YugabyteDB_Managed" label="YugabyteDB Managed">
You can restore from the scheduled or on-demand backup within the backup retention period. For details on performing backups, see [YugabyteDB Managed: Back up and restore clusters](https://docs.yugabyte.com/preview/yugabyte-cloud/cloud-clusters/backup-clusters/).
</TabItem>
<TabItem value="Db2" label="Db2">
Use the `restore` command. For details, on restoring the database, see [Db2: Restore overview](https://www.ibm.com/docs/en/db2/12.1.0?topic=recovery-restore).
</TabItem>
</Tabs>
Loading