Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
485a2cfc
Commit
485a2cfc
authored
Aug 07, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
79f54dcb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
45 deletions
+39
-45
go/transaction/api.go
go/transaction/api.go
+21
-25
go/transaction/transaction.go
go/transaction/transaction.go
+11
-12
go/transaction/transaction_test.go
go/transaction/transaction_test.go
+7
-8
No files found.
go/transaction/api.go
View file @
485a2cfc
...
...
@@ -148,7 +148,6 @@ type Transaction interface {
// XXX +Note, SetUser, ...
// Status returns current status of the transaction.
Status
()
Status
...
...
@@ -170,7 +169,6 @@ type Transaction interface {
// XXX + Doom?
// ---- part for data managers & friends ----
// XXX move to separate interface?
...
...
@@ -208,7 +206,6 @@ func Current(ctx context.Context) Transaction {
return
currentTxn
(
ctx
)
}
// DataManager manages data and can transactionally persist it.
//
// If DataManager is registered to transaction via Transaction.Join, it will
...
...
@@ -261,7 +258,6 @@ type DataManager interface {
// This should never fail.
TPCAbort
(
ctx
context
.
Context
,
txn
Transaction
)
// XXX error?
// XXX better do without SortKey - with it it is assumed that
// datamanagers are processed serially.
// SortKey() string
...
...
go/transaction/transaction.go
View file @
485a2cfc
...
...
@@ -199,7 +199,6 @@ func (txn *transaction) checkNotYetCompleting(who string) {
}
}
// ---- meta ----
func
(
txn
*
transaction
)
User
()
string
{
return
txn
.
user
}
...
...
go/transaction/transaction_test.go
View file @
485a2cfc
...
...
@@ -44,7 +44,6 @@ func TestBasic(t *testing.T) {
Current
(
ctx
)
}()
// New
txn
,
ctx
:=
New
(
ctx
)
if
txn_
:=
Current
(
ctx
);
txn_
!=
txn
{
...
...
@@ -52,7 +51,7 @@ func TestBasic(t *testing.T) {
}
// New(!ø) -> panic
func
()
{
func
()
{
defer
func
()
{
r
:=
recover
()
if
r
==
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment