Skip to content

Commit 3468564

Browse files
authored
Prepare for release 3.4.0-rc0 (#760)
## Usage and product changes Update dependnecies, release notes and version ## Implementation
1 parent 6db6f94 commit 3468564

File tree

5 files changed

+42
-66
lines changed

5 files changed

+42
-66
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

RELEASE_NOTES_LATEST.md

Lines changed: 38 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Documentation: https://typedb.com/docs/drivers/rust/overview
99

1010

1111
```sh
12-
cargo add typedb-driver@3.2.0
12+
cargo add typedb-driver@3.4.0-rc0
1313
```
1414

1515

1616
### Java driver
1717

18-
Available through [https://repo.typedb.com](https://cloudsmith.io/~typedb/repos/public-release/packages/detail/maven/typedb-driver/3.2.0/a=noarch;xg=com.typedb/)
18+
Available through [https://repo.typedb.com](https://cloudsmith.io/~typedb/repos/public-release/packages/detail/maven/typedb-driver/3.4.0-rc0/a=noarch;xg=com.typedb/)
1919
Documentation: https://typedb.com/docs/drivers/java/overview
2020

2121
```xml
@@ -29,7 +29,7 @@ Documentation: https://typedb.com/docs/drivers/java/overview
2929
<dependency>
3030
<groupid>com.typedb</groupid>
3131
<artifactid>typedb-driver</artifactid>
32-
<version>3.2.0</version>
32+
<version>3.4.0-rc0</version>
3333
</dependency>
3434
</dependencies>
3535
```
@@ -42,87 +42,63 @@ Documentation: https://typedb.com/docs/drivers/python/overview
4242
Available through https://pypi.org
4343

4444
```
45-
pip install typedb-driver==3.2.0
45+
pip install typedb-driver==3.4.0rc0
4646
```
4747

48+
4849
## New Features
49-
- **Introduce transaction and query options**
50-
**Introduce transaction options:**
51-
* `transaction_timeout`: If set, specifies a timeout for killing transactions automatically, preventing memory leaks in unclosed transactions,
52-
* `schema_lock_acquire_timeout`: If set, specifies how long the driver should wait if opening a transaction is blocked by an exclusive schema write lock.
53-
54-
Rust examples:
55-
```rust
56-
let options = TransactionOptions::new().transaction_timeout(Duration::from_secs(10));
57-
let transaction =
58-
driver.transaction_with_options(database.name(), TransactionType::Schema, options).await.unwrap();
59-
```
60-
61-
Python example:
62-
```py
63-
options = TransactionOptions(transaction_timeout_millis=10_000)
64-
tx = driver.transaction(database.name, TransactionType.SCHEMA, options)
65-
```
66-
67-
Java example:
68-
```java
69-
TransactionOptions transactionOptions = new TransactionOptions().transactionTimeoutMillis(10_000);
70-
Transaction transaction = driver.transaction(database.name(), Transaction.Type.SCHEMA, transactionOptions);
71-
```
50+
- **Introduce file-based database export and import**
51+
Introduce interfaces to export databases into schema definition and data files and to import databases using these files. Database import supports files exported from both TypeDB 2.x and TypeDB 3.x.
7252

73-
**Introduce query options:**
74-
* `include_instance_types`: If set, specifies if types should be included in instance structs returned in ConceptRow answers,
75-
* `prefetch_size`: If set, specifies the number of extra query responses sent before the client side has to re-request more responses. Increasing this may increase performance for queries with a huge number of answers, as it can reduce the number of network round-trips at the cost of more resources on the server side.
53+
Both operations are blocking and may take a significant amount of time to execute for large databases. Use parallel connections to continue operating with the server and its other databases.
7654

77-
Rust examples:
55+
Usage examples in Rust:
7856
```rust
79-
let options = QueryOptions::new().include_instance_types(true);
80-
let answer = transaction.query_with_options("match $x isa person;", options).await.unwrap();
57+
// export
58+
let db = driver.databases().get(db_name).await.unwrap();
59+
db.export_to_file(schema_file_path, data_file_path).await.unwrap();
60+
61+
// import
62+
let schema = read_to_string(schema_file_path).unwrap();
63+
driver.databases().import_from_file(db_name2, schema, data_file_path).await.unwrap();
8164
```
8265

83-
Python example:
66+
Usage examples in Python:
8467
```py
85-
options = QueryOptions(include_instance_types=True)
86-
answer = tx.query("match $x isa person;").resolve()
68+
# export
69+
database = driver.databases.get(db_name)
70+
database.export_to_file(schema_file_path, data_file_path)
71+
72+
# import
73+
with open(schema_file_path, 'r', encoding='utf-8') as f:
74+
schema = f.read()
75+
driver.databases.import_from_file(db_name2, schema, data_file_path)
8776
```
8877

89-
Java example:
78+
Usage examples in Java:
9079
```java
91-
QueryOptions queryOptions = new QueryOptions().includeInstanceTypes(true);
92-
QueryAnswer matchAnswer = transaction.query("match $x isa person;", queryOptions).resolve();
93-
```
80+
// export
81+
Database database = driver.databases().get(dbName);
82+
database.exportToFile(schemaFilePath, dataFilePath);
9483

95-
96-
- **Introduce Rust driver token-based authentication**
97-
We update the protocol version and introduce token-based authentication for all the available drivers. Now, instead of sending usernames and passwords for authentication purposes, authorization tokens are implicitly added to every network request to a TypeDB server. It enhances the authentication speed and security.
98-
99-
These tokens are acquired as a result of driver instantiation and are renewed automatically. This feature does not require any user-side changes.
100-
101-
Additionally, as a part of the HTTP client introduction work, we rename Concept Documents key style from snake_case to camelCase, which is a common convention for JSONs (it affects only value types: `value_type` -> `valueType`).
84+
// import
85+
String schema = Files.readString(Path.of(schemaFilePath));
86+
driver.databases().importFromFile(dbName2, schema, dataFilePath);
87+
```
10288

10389

10490

10591
## Bugs Fixed
106-
- **Fix incorrect resource ownership transmission in schema retrieval C functions**
107-
Fix a crash caused by an incorrect database's ownership acquisition in the C layer of the `schema` and `type_schema` functions, affecting Python and Java drivers.
92+
- **Handle "Unexpected response type for remote procedure call: Close" on query stream opening**
93+
Fix a rare `InternalError` returned by mistake when a client sends a query request while the transaction is being closed. Now, an expected "The transaction is closed and no further operation is allowed." error is returned instead.
10894

109-
Add respective BDD steps implementations for these functions in Rust, Python, and Java.
95+
Additionally, wait for specific transaction responses in `rollback`, `commit`, and `query` to solidify the protocol and ensure that the server acts as expected.
11096

11197

11298

11399
## Code Refactors
114100

115101

116102
## Other Improvements
117-
118-
- **Update dependencies**
119-
After a recent update of the crates, rustls added aws-lc-rs as a default dependency. This caused runtime issues during loading of the shared library where the dynamic linker could not find some symbols from aws-lc:
120-
121-
```
122-
ImportError: dlopen(.../native_driver_python.so, 0x0002): symbol not found in flat namespace '_aws_lc_0_28_0_EVP_aead_aes_128_gcm'
123-
```
124-
125-
We decided to force the use of ring as the cryptographic provider for rustls instead.
126-
127-
128-
103+
104+

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.0
1+
3.4.0-rc0

dependencies/typedb/repositories.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def typedb_protocol():
2828
git_repository(
2929
name = "typedb_protocol",
3030
remote = "https://github.com/typedb/typedb-protocol",
31-
commit = "f6528beec33d6e3c31cb5dafc30e8f0f097c3f82", # sync-marker: do not remove this comment, this is used for sync-dependencies by @typedb_protocol
31+
tag = "3.4.0-rc0", # sync-marker: do not remove this comment, this is used for sync-dependencies by @typedb_protocol
3232
)
3333

3434
def typedb_behaviour():

rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060

6161
[dependencies.typedb-protocol]
6262
features = []
63-
rev = "f6528beec33d6e3c31cb5dafc30e8f0f097c3f82"
6463
git = "https://github.com/typedb/typedb-protocol"
64+
tag = "3.4.0-rc0"
6565
default-features = false
6666

6767
[dependencies.log]

0 commit comments

Comments
 (0)