Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
tapir
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
syslab
tapir
Commits
c5444ac4
Commit
c5444ac4
authored
9 years ago
by
Irene Y Zhang
Browse files
Options
Downloads
Patches
Plain Diff
piping proposed transaction timestimp through to server and back for TAPIR
parent
cd3706f4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
store/tapirstore/server.cc
+7
-1
7 additions, 1 deletion
store/tapirstore/server.cc
store/tapirstore/shardclient.cc
+1
-0
1 addition, 0 deletions
store/tapirstore/shardclient.cc
store/tapirstore/tapir-proto.proto
+1
-1
1 addition, 1 deletion
store/tapirstore/tapir-proto.proto
with
9 additions
and
2 deletions
store/tapirstore/server.cc
+
7
−
1
View file @
c5444ac4
...
...
@@ -75,14 +75,20 @@ Server::ExecConsensusUpcall(const string &str1, string &str2)
Request
request
;
Reply
reply
;
int
status
;
Timestamp
proposed
;
request
.
ParseFromString
(
str1
);
switch
(
request
.
op
())
{
case
tapirstore
::
proto
::
Request
::
PREPARE
:
status
=
store
->
Prepare
(
request
.
txnid
(),
Transaction
(
request
.
prepare
().
txn
()));
Transaction
(
request
.
prepare
().
txn
()),
Timestamp
(
request
.
prepare
().
timestamp
()),
proposed
);
reply
.
set_status
(
status
);
if
(
proposed
.
isValid
())
{
reply
.
set_timestamp
(
proposed
.
getTimestamp
());
}
reply
.
SerializeToString
(
&
str2
);
break
;
default
:
...
...
This diff is collapsed.
Click to expand it.
store/tapirstore/shardclient.cc
+
1
−
0
View file @
c5444ac4
...
...
@@ -157,6 +157,7 @@ ShardClient::Prepare(uint64_t id, const Transaction &txn,
request
.
set_op
(
Request
::
PREPARE
);
request
.
set_txnid
(
id
);
txn
.
serialize
(
request
.
mutable_prepare
()
->
mutable_txn
());
timestamp
.
serialize
(
request
.
mutable_prepare
()
->
mutable_timestamp
());
request
.
SerializeToString
(
&
request_str
);
transport
->
Timer
(
0
,
[
=
]()
{
...
...
This diff is collapsed.
Click to expand it.
store/tapirstore/tapir-proto.proto
+
1
−
1
View file @
c5444ac4
...
...
@@ -9,7 +9,7 @@ message GetMessage {
message
PrepareMessage
{
required
TransactionMessage
txn
=
1
;
optional
uint64
timestamp
=
2
;
optional
TimestampMessage
timestamp
=
2
;
}
message
CommitMessage
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment