Skip to content
This repository was archived by the owner on May 27, 2022. It is now read-only.

Commit 0250c9f

Browse files
peterzellerbieniusa
authored andcommitted
Add locks to transaction properties (#12)
* update pb-version (old version no longer working with latest Erlang) * add locks to transaction properties
1 parent 486195f commit 0250c9f

File tree

5 files changed

+530
-74
lines changed

5 files changed

+530
-74
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ lint:
2525

2626
_build/gpb:
2727
mkdir -p _build/
28-
(cd _build/ && git clone https://github.com/tomas-abrahamsson/gpb && cd gpb && git checkout 4.4.0)
28+
(cd _build/ && git clone https://github.com/tomas-abrahamsson/gpb && cd gpb && git checkout 4.10.2)
2929

3030
_build/gpb/bin/protoc-erl: _build/gpb
3131
(cd _build/gpb && make)

include/antidote_pb.hrl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@
138138
-define('APBTXNPROPERTIES_PB_H', true).
139139
-record('ApbTxnProperties',
140140
{read_write :: non_neg_integer() | undefined, % = 1, 32 bits
141-
red_blue :: non_neg_integer() | undefined % = 2, 32 bits
141+
red_blue :: non_neg_integer() | undefined, % = 2, 32 bits
142+
shared_locks = [] :: [iodata()] | undefined, % = 3
143+
exclusive_locks = [] :: [iodata()] | undefined % = 4
142144
}).
143145
-endif.
144146

proto/antidote.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ message ApbOperationResp {
140140
message ApbTxnProperties {
141141
optional uint32 read_write = 1 ; //default = 0 = read_write, 1 = read_only, 2 = write_only
142142
optional uint32 red_blue = 2 ; // default = 0 = blue, 1 = red
143+
repeated bytes shared_locks = 3;
144+
repeated bytes exclusive_locks = 4;
143145
}
144146

145147
// Object (Key) representation

0 commit comments

Comments
 (0)