Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d10e9ba9
Commit
d10e9ba9
authored
Aug 27, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better handling of transaction ids,
make *sure* that no one gets same transid twice (wo/ restarting process)
parent
6af42cfb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
12 deletions
+13
-12
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+1
-1
ndb/src/ndbapi/Ndbif.cpp
ndb/src/ndbapi/Ndbif.cpp
+2
-2
ndb/src/ndbapi/Ndbinit.cpp
ndb/src/ndbapi/Ndbinit.cpp
+2
-2
ndb/src/ndbapi/TransporterFacade.cpp
ndb/src/ndbapi/TransporterFacade.cpp
+4
-3
ndb/src/ndbapi/TransporterFacade.hpp
ndb/src/ndbapi/TransporterFacade.hpp
+4
-4
No files found.
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
d10e9ba9
...
@@ -682,7 +682,7 @@ NdbDictInterface::~NdbDictInterface()
...
@@ -682,7 +682,7 @@ NdbDictInterface::~NdbDictInterface()
{
{
if
(
m_transporter
!=
NULL
){
if
(
m_transporter
!=
NULL
){
if
(
m_blockNumber
!=
-
1
)
if
(
m_blockNumber
!=
-
1
)
m_transporter
->
close
(
m_blockNumber
);
m_transporter
->
close
(
m_blockNumber
,
0
);
}
}
}
}
...
...
ndb/src/ndbapi/Ndbif.cpp
View file @
d10e9ba9
...
@@ -97,7 +97,7 @@ Ndb::init(int aMaxNoOfTransactions)
...
@@ -97,7 +97,7 @@ Ndb::init(int aMaxNoOfTransactions)
}
}
theFirstTransId
=
((
Uint64
)
theNdbBlockNumber
<<
52
)
+
((
Uint64
)
theNode
<<
40
);
theFirstTransId
=
((
Uint64
)
theNdbBlockNumber
<<
52
)
+
((
Uint64
)
theNode
<<
40
);
theFirstTransId
+=
theFacade
->
m_
open_count
;
theFirstTransId
+=
theFacade
->
m_
max_trans_id
;
theFacade
->
unlock_mutex
();
theFacade
->
unlock_mutex
();
...
@@ -175,7 +175,7 @@ Ndb::init(int aMaxNoOfTransactions)
...
@@ -175,7 +175,7 @@ Ndb::init(int aMaxNoOfTransactions)
freeOperation
();
freeOperation
();
delete
theDictionary
;
delete
theDictionary
;
TransporterFacade
::
instance
()
->
close
(
theNdbBlockNumber
);
TransporterFacade
::
instance
()
->
close
(
theNdbBlockNumber
,
0
);
return
-
1
;
return
-
1
;
}
}
...
...
ndb/src/ndbapi/Ndbinit.cpp
View file @
d10e9ba9
...
@@ -195,9 +195,9 @@ Ndb::~Ndb()
...
@@ -195,9 +195,9 @@ Ndb::~Ndb()
NdbGlobalEventBuffer_drop
(
theGlobalEventBufferHandle
);
NdbGlobalEventBuffer_drop
(
theGlobalEventBufferHandle
);
if
(
TransporterFacade
::
instance
()
!=
NULL
&&
theNdbBlockNumber
>
0
){
if
(
TransporterFacade
::
instance
()
!=
NULL
&&
theNdbBlockNumber
>
0
){
TransporterFacade
::
instance
()
->
close
(
theNdbBlockNumber
);
TransporterFacade
::
instance
()
->
close
(
theNdbBlockNumber
,
theFirstTransId
);
}
}
NdbMutex_Lock
(
&
createNdbMutex
);
NdbMutex_Lock
(
&
createNdbMutex
);
theNoOfNdbObjects
-=
1
;
theNoOfNdbObjects
-=
1
;
...
...
ndb/src/ndbapi/TransporterFacade.cpp
View file @
d10e9ba9
...
@@ -548,7 +548,7 @@ TransporterFacade::TransporterFacade() :
...
@@ -548,7 +548,7 @@ TransporterFacade::TransporterFacade() :
theClusterMgr
=
NULL
;
theClusterMgr
=
NULL
;
theArbitMgr
=
NULL
;
theArbitMgr
=
NULL
;
theStartNodeId
=
1
;
theStartNodeId
=
1
;
m_
open_count
=
0
;
m_
max_trans_id
=
0
;
}
}
bool
bool
...
@@ -684,9 +684,11 @@ TransporterFacade::ReportNodeAlive(NodeId tNodeId)
...
@@ -684,9 +684,11 @@ TransporterFacade::ReportNodeAlive(NodeId tNodeId)
}
}
int
int
TransporterFacade
::
close
(
BlockNumber
blockNumber
)
TransporterFacade
::
close
(
BlockNumber
blockNumber
,
Uint64
trans_id
)
{
{
NdbMutex_Lock
(
theMutexPtr
);
NdbMutex_Lock
(
theMutexPtr
);
Uint32
low_bits
=
(
Uint32
)
trans_id
;
m_max_trans_id
=
m_max_trans_id
>
low_bits
?
m_max_trans_id
:
low_bits
;
close_local
(
blockNumber
);
close_local
(
blockNumber
);
NdbMutex_Unlock
(
theMutexPtr
);
NdbMutex_Unlock
(
theMutexPtr
);
return
0
;
return
0
;
...
@@ -703,7 +705,6 @@ TransporterFacade::open(void* objRef,
...
@@ -703,7 +705,6 @@ TransporterFacade::open(void* objRef,
ExecuteFunction
fun
,
ExecuteFunction
fun
,
NodeStatusFunction
statusFun
)
NodeStatusFunction
statusFun
)
{
{
m_open_count
++
;
return
m_threads
.
open
(
objRef
,
fun
,
statusFun
);
return
m_threads
.
open
(
objRef
,
fun
,
statusFun
);
}
}
...
...
ndb/src/ndbapi/TransporterFacade.hpp
View file @
d10e9ba9
...
@@ -67,7 +67,7 @@ public:
...
@@ -67,7 +67,7 @@ public:
int
open
(
void
*
objRef
,
ExecuteFunction
,
NodeStatusFunction
);
int
open
(
void
*
objRef
,
ExecuteFunction
,
NodeStatusFunction
);
// Close this block number
// Close this block number
int
close
(
BlockNumber
blockNumber
);
int
close
(
BlockNumber
blockNumber
,
Uint64
trans_id
);
// Only sends to nodes which are alive
// Only sends to nodes which are alive
int
sendSignal
(
NdbApiSignal
*
signal
,
NodeId
nodeId
);
int
sendSignal
(
NdbApiSignal
*
signal
,
NodeId
nodeId
);
...
@@ -210,9 +210,9 @@ private:
...
@@ -210,9 +210,9 @@ private:
return
(
m_statusNext
[
index
]
&
(
1
<<
16
))
!=
0
;
return
(
m_statusNext
[
index
]
&
(
1
<<
16
))
!=
0
;
}
}
}
m_threads
;
}
m_threads
;
Uint32
m_
open_count
;
Uint32
m_
max_trans_id
;
/**
/**
* execute function
* execute function
*/
*/
...
...
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