Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
8
818f19p5
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Peter Keleher
818f19p5
Commits
b9d8fb4e
Commit
b9d8fb4e
authored
5 years ago
by
keleher
Browse files
Options
Downloads
Patches
Plain Diff
auto
parent
a4d03d7e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+43
-34
43 additions, 34 deletions
README.md
with
43 additions
and
34 deletions
README.md
+
43
−
34
View file @
b9d8fb4e
...
@@ -112,8 +112,9 @@ log abstraction in `replica.go`
...
@@ -112,8 +112,9 @@ log abstraction in `replica.go`
## Use of the `transactionalClient`
## Use of the `transactionalClient`
`transactionalClient.go`
differs from
`client.go`
in that it reads commands
`transactionalClient.go`
differs from
`client.go`
in that it reads commands
interactively. Once started, it reads commands (arbitrary strings) from STDIN
interactively. Once started, it reads commands (arbitrary strings) from STDIN
and sends them to replica 0. The sole exception
is
:
and sends them to replica 0. The sole exception
s are
:
-
`pause <n>`
is interpreted as a command to pause for
`n`
seconds.
-
`pause <n>`
is interpreted as a command to pause for
`n`
seconds.
-
an empty string (just carriage return) is ignored.
All other strings are sent to the replica.
All other strings are sent to the replica.
At end-of-text (CTRL-D),
`transactionalClient`
prints the contents of the K/V
At end-of-text (CTRL-D),
`transactionalClient`
prints the contents of the K/V
...
@@ -129,51 +130,59 @@ two things:
...
@@ -129,51 +130,59 @@ two things:
### Strict Serializability
### Strict Serializability
One example. Time is going downwards. Note that transaction
*1*
of client
*1*
is different
One example. Time is going downwards. Note that transaction
*1*
of client
*1*
is different
from transaction
*1*
of client
*2*
. You can type these in interactively.
from transaction
*1*
of client
*2*
. You can type these in interactively.
```
1,1,w,A,0
1,1,w,B,0
1,1,commit
1,2,r,A
1,2,w,B,nice
2,1,r,A
2,1,w,B,foo
2,2,w,A,bar
2,2,r,B
2,2,commit
2,1,commit
1,2,commit
```
R1 R2
1,1,w,A,0
1,1,w,B,0
1,1,commit
1,2,r,A
1,2,w,B,nice
2,1,r,A
2,1,w,B,foo
2,2,w,A,bar
2,2,r,B
2,2,commit
2,1,commit
1,2,commit
If one of the clients was invoked with option
`-p`
, it should print:
If one of the clients was invoked with option
`-p`
, it should print:
```
```
trans 1.1 commit
trans 1.1 commit
trans 2.2 commit
trans 2.2 commit
trans 2.1 abort
trans 2.1 abort
trans 1.2 abort
trans 1.2 abort
A=
'
bar
'
A=
"
bar
"
B=
'0'
B=
"0"
```
```
---
---
And another:
And another:
```
1,1,w,A,0
1,1,w,B,0
1,1,commit
1,2,w,A,1
1,2,r,B
2,1,w,B,1
2,1,r,A
2,1,commit
1,2,commit
```
R1 R2
1,1,w,A,0
1,1,w,B,0
1,1,commit
1,2,w,A,1
1,1,r,B
2,1,w,B,1
2,1,r,A
2,1,commit
1,2,commit
Your client w/
`-p`
should print:
Your client w/
`-p`
should print:
```
```
trans 1.1 commit
trans 1.1 commit
trans 2.1 commit
trans 2.1 commit
trans 1.2 abort
trans 1.2 abort
A=
'0'
A=
"0"
B=
'1'
B=
"1"
```
```
...
@@ -185,16 +194,16 @@ trans 1.1 commit
...
@@ -185,16 +194,16 @@ trans 1.1 commit
trans 2.2 commit
trans 2.2 commit
trans 2.1 commit
trans 2.1 commit
trans 1.2 abort
trans 1.2 abort
A=
'
bar
'
A=
"
bar
"
B=
'
foo
'
B=
"
foo
"
```
```
and
and
```
```
trans 1.1 commit
trans 1.1 commit
trans 2.1 commit
trans 2.1 commit
trans 1.2 abort
trans 1.2 abort
A=
'1'
A=
"1"
B=
'1'
B=
"1"
```
```
## Submitting
## Submitting
...
...
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