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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
3979938c
Commit
3979938c
authored
Sep 08, 2005
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrected prev fix for bug #13054
so that _only_ backup master replies to API
parent
06345424
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
33 deletions
+39
-33
ndb/src/kernel/blocks/backup/Backup.cpp
ndb/src/kernel/blocks/backup/Backup.cpp
+39
-33
No files found.
ndb/src/kernel/blocks/backup/Backup.cpp
View file @
3979938c
...
@@ -859,20 +859,20 @@ Backup::execBACKUP_REQ(Signal* signal)
...
@@ -859,20 +859,20 @@ Backup::execBACKUP_REQ(Signal* signal)
if
(
getOwnNodeId
()
!=
getMasterNodeId
())
{
if
(
getOwnNodeId
()
!=
getMasterNodeId
())
{
jam
();
jam
();
sendBackupRef
(
senderRef
,
signal
,
senderData
,
BackupRef
::
IAmNotMaster
);
sendBackupRef
(
senderRef
,
flags
,
signal
,
senderData
,
BackupRef
::
IAmNotMaster
);
return
;
return
;
}
//if
}
//if
if
(
m_diskless
)
if
(
m_diskless
)
{
{
sendBackupRef
(
senderRef
,
signal
,
senderData
,
sendBackupRef
(
senderRef
,
flags
,
signal
,
senderData
,
BackupRef
::
CannotBackupDiskless
);
BackupRef
::
CannotBackupDiskless
);
return
;
return
;
}
}
if
(
dataLen32
!=
0
)
{
if
(
dataLen32
!=
0
)
{
jam
();
jam
();
sendBackupRef
(
senderRef
,
signal
,
senderData
,
sendBackupRef
(
senderRef
,
flags
,
signal
,
senderData
,
BackupRef
::
BackupDefinitionNotImplemented
);
BackupRef
::
BackupDefinitionNotImplemented
);
return
;
return
;
}
//if
}
//if
...
@@ -887,7 +887,7 @@ Backup::execBACKUP_REQ(Signal* signal)
...
@@ -887,7 +887,7 @@ Backup::execBACKUP_REQ(Signal* signal)
c_backups
.
seize
(
ptr
);
c_backups
.
seize
(
ptr
);
if
(
ptr
.
i
==
RNIL
)
{
if
(
ptr
.
i
==
RNIL
)
{
jam
();
jam
();
sendBackupRef
(
senderRef
,
signal
,
senderData
,
BackupRef
::
OutOfBackupRecord
);
sendBackupRef
(
senderRef
,
flags
,
signal
,
senderData
,
BackupRef
::
OutOfBackupRecord
);
return
;
return
;
}
//if
}
//if
...
@@ -936,23 +936,23 @@ void
...
@@ -936,23 +936,23 @@ void
Backup
::
sendBackupRef
(
Signal
*
signal
,
BackupRecordPtr
ptr
,
Uint32
errorCode
)
Backup
::
sendBackupRef
(
Signal
*
signal
,
BackupRecordPtr
ptr
,
Uint32
errorCode
)
{
{
jam
();
jam
();
if
(
SEND_BACKUP_STARTED_FLAG
(
ptr
.
p
->
flags
))
sendBackupRef
(
ptr
.
p
->
clientRef
,
ptr
.
p
->
flags
,
signal
,
ptr
.
p
->
clientData
,
errorCode
);
{
sendBackupRef
(
ptr
.
p
->
clientRef
,
signal
,
ptr
.
p
->
clientData
,
errorCode
);
}
cleanup
(
signal
,
ptr
);
cleanup
(
signal
,
ptr
);
}
}
void
void
Backup
::
sendBackupRef
(
BlockReference
senderRef
,
Signal
*
signal
,
Backup
::
sendBackupRef
(
BlockReference
senderRef
,
Uint32
flags
,
Signal
*
signal
,
Uint32
senderData
,
Uint32
errorCode
)
Uint32
senderData
,
Uint32
errorCode
)
{
{
jam
();
jam
();
BackupRef
*
ref
=
(
BackupRef
*
)
signal
->
getDataPtrSend
();
if
(
SEND_BACKUP_STARTED_FLAG
(
flags
))
ref
->
senderData
=
senderData
;
{
ref
->
errorCode
=
errorCode
;
BackupRef
*
ref
=
(
BackupRef
*
)
signal
->
getDataPtrSend
();
ref
->
masterRef
=
numberToRef
(
BACKUP
,
getMasterNodeId
());
ref
->
senderData
=
senderData
;
sendSignal
(
senderRef
,
GSN_BACKUP_REF
,
signal
,
BackupRef
::
SignalLength
,
JBB
);
ref
->
errorCode
=
errorCode
;
ref
->
masterRef
=
numberToRef
(
BACKUP
,
getMasterNodeId
());
sendSignal
(
senderRef
,
GSN_BACKUP_REF
,
signal
,
BackupRef
::
SignalLength
,
JBB
);
}
if
(
errorCode
!=
BackupRef
::
IAmNotMaster
){
if
(
errorCode
!=
BackupRef
::
IAmNotMaster
){
signal
->
theData
[
0
]
=
EventReport
::
BackupFailedToStart
;
signal
->
theData
[
0
]
=
EventReport
::
BackupFailedToStart
;
...
@@ -1204,12 +1204,12 @@ Backup::defineBackupReply(Signal* signal, BackupRecordPtr ptr, Uint32 nodeId)
...
@@ -1204,12 +1204,12 @@ Backup::defineBackupReply(Signal* signal, BackupRecordPtr ptr, Uint32 nodeId)
*/
*/
CRASH_INSERTION
((
10034
));
CRASH_INSERTION
((
10034
));
BackupConf
*
conf
=
(
BackupConf
*
)
signal
->
getDataPtrSend
();
conf
->
backupId
=
ptr
.
p
->
backupId
;
conf
->
senderData
=
ptr
.
p
->
clientData
;
conf
->
nodes
=
ptr
.
p
->
nodes
;
if
(
SEND_BACKUP_STARTED_FLAG
(
ptr
.
p
->
flags
))
if
(
SEND_BACKUP_STARTED_FLAG
(
ptr
.
p
->
flags
))
{
{
BackupConf
*
conf
=
(
BackupConf
*
)
signal
->
getDataPtrSend
();
conf
->
backupId
=
ptr
.
p
->
backupId
;
conf
->
senderData
=
ptr
.
p
->
clientData
;
conf
->
nodes
=
ptr
.
p
->
nodes
;
sendSignal
(
ptr
.
p
->
clientRef
,
GSN_BACKUP_CONF
,
signal
,
sendSignal
(
ptr
.
p
->
clientRef
,
GSN_BACKUP_CONF
,
signal
,
BackupConf
::
SignalLength
,
JBB
);
BackupConf
::
SignalLength
,
JBB
);
}
}
...
@@ -2094,18 +2094,18 @@ Backup::stopBackupReply(Signal* signal, BackupRecordPtr ptr, Uint32 nodeId)
...
@@ -2094,18 +2094,18 @@ Backup::stopBackupReply(Signal* signal, BackupRecordPtr ptr, Uint32 nodeId)
if
(
!
ptr
.
p
->
checkError
())
if
(
!
ptr
.
p
->
checkError
())
{
{
BackupCompleteRep
*
rep
=
(
BackupCompleteRep
*
)
signal
->
getDataPtrSend
();
rep
->
backupId
=
ptr
.
p
->
backupId
;
rep
->
senderData
=
ptr
.
p
->
clientData
;
rep
->
startGCP
=
ptr
.
p
->
startGCP
;
rep
->
stopGCP
=
ptr
.
p
->
stopGCP
;
rep
->
noOfBytes
=
ptr
.
p
->
noOfBytes
;
rep
->
noOfRecords
=
ptr
.
p
->
noOfRecords
;
rep
->
noOfLogBytes
=
ptr
.
p
->
noOfLogBytes
;
rep
->
noOfLogRecords
=
ptr
.
p
->
noOfLogRecords
;
rep
->
nodes
=
ptr
.
p
->
nodes
;
if
(
SEND_BACKUP_COMPLETED_FLAG
(
ptr
.
p
->
flags
))
if
(
SEND_BACKUP_COMPLETED_FLAG
(
ptr
.
p
->
flags
))
{
{
BackupCompleteRep
*
rep
=
(
BackupCompleteRep
*
)
signal
->
getDataPtrSend
();
rep
->
backupId
=
ptr
.
p
->
backupId
;
rep
->
senderData
=
ptr
.
p
->
clientData
;
rep
->
startGCP
=
ptr
.
p
->
startGCP
;
rep
->
stopGCP
=
ptr
.
p
->
stopGCP
;
rep
->
noOfBytes
=
ptr
.
p
->
noOfBytes
;
rep
->
noOfRecords
=
ptr
.
p
->
noOfRecords
;
rep
->
noOfLogBytes
=
ptr
.
p
->
noOfLogBytes
;
rep
->
noOfLogRecords
=
ptr
.
p
->
noOfLogRecords
;
rep
->
nodes
=
ptr
.
p
->
nodes
;
sendSignal
(
ptr
.
p
->
clientRef
,
GSN_BACKUP_COMPLETE_REP
,
signal
,
sendSignal
(
ptr
.
p
->
clientRef
,
GSN_BACKUP_COMPLETE_REP
,
signal
,
BackupCompleteRep
::
SignalLength
,
JBB
);
BackupCompleteRep
::
SignalLength
,
JBB
);
}
}
...
@@ -2146,12 +2146,12 @@ Backup::masterAbort(Signal* signal, BackupRecordPtr ptr)
...
@@ -2146,12 +2146,12 @@ Backup::masterAbort(Signal* signal, BackupRecordPtr ptr)
return
;
return
;
}
}
BackupAbortRep
*
rep
=
(
BackupAbortRep
*
)
signal
->
getDataPtrSend
();
rep
->
backupId
=
ptr
.
p
->
backupId
;
rep
->
senderData
=
ptr
.
p
->
clientData
;
rep
->
reason
=
ptr
.
p
->
errorCode
;
if
(
SEND_BACKUP_COMPLETED_FLAG
(
ptr
.
p
->
flags
))
if
(
SEND_BACKUP_COMPLETED_FLAG
(
ptr
.
p
->
flags
))
{
{
BackupAbortRep
*
rep
=
(
BackupAbortRep
*
)
signal
->
getDataPtrSend
();
rep
->
backupId
=
ptr
.
p
->
backupId
;
rep
->
senderData
=
ptr
.
p
->
clientData
;
rep
->
reason
=
ptr
.
p
->
errorCode
;
sendSignal
(
ptr
.
p
->
clientRef
,
GSN_BACKUP_ABORT_REP
,
signal
,
sendSignal
(
ptr
.
p
->
clientRef
,
GSN_BACKUP_ABORT_REP
,
signal
,
BackupAbortRep
::
SignalLength
,
JBB
);
BackupAbortRep
::
SignalLength
,
JBB
);
}
}
...
@@ -2286,7 +2286,13 @@ Backup::execDEFINE_BACKUP_REQ(Signal* signal)
...
@@ -2286,7 +2286,13 @@ Backup::execDEFINE_BACKUP_REQ(Signal* signal)
ptr
.
p
->
errorCode
=
0
;
ptr
.
p
->
errorCode
=
0
;
ptr
.
p
->
clientRef
=
req
->
clientRef
;
ptr
.
p
->
clientRef
=
req
->
clientRef
;
ptr
.
p
->
clientData
=
req
->
clientData
;
ptr
.
p
->
clientData
=
req
->
clientData
;
ptr
.
p
->
flags
=
req
->
flags
;
if
(
senderRef
==
reference
())
ptr
.
p
->
flags
=
req
->
flags
;
else
ptr
.
p
->
flags
=
req
->
flags
&
~
((
Uint32
)
0x3
);
/* remove waitCompleted flags
* as non master should never
* reply
*/
ptr
.
p
->
masterRef
=
senderRef
;
ptr
.
p
->
masterRef
=
senderRef
;
ptr
.
p
->
nodes
=
req
->
nodes
;
ptr
.
p
->
nodes
=
req
->
nodes
;
ptr
.
p
->
backupId
=
backupId
;
ptr
.
p
->
backupId
=
backupId
;
...
...
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