Skip to content

Commit 1cb73f1

Browse files
author
Ganeshwara Hananda
authored
Introduce a new transaction type for reading from secondary replicas (#110)
## What is the goal of this PR? We've introduced a new Grakn-Cluster-specific transaction type, "read secondary". It is a read-only transaction that may read not only from primary but also from secondary replicas. ## What are the changes implemented in this PR? - Adds a new option `allow_secondary_replica`
1 parent f49cbca commit 1cb73f1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

protobuf/cluster/database.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ message Database {
3434
message Replica {
3535
string address = 1;
3636
string database = 2;
37-
bool is_leader = 3;
37+
bool is_primary = 3;
3838
int64 term = 4;
3939
}
4040
}

protobuf/options.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,7 @@ message Options {
4444
oneof schema_lock_acquire_timeout_opt {
4545
int32 schema_lock_acquire_timeout_millis = 6;
4646
}
47+
oneof allow_secondary_replica_opt {
48+
bool allow_secondary_replica = 7;
49+
}
4750
}

0 commit comments

Comments
 (0)