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
8fb56fbc
Commit
8fb56fbc
authored
Aug 28, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb -
Snapup testBackup XXXerror
parent
802990e1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
66 deletions
+82
-66
storage/ndb/src/kernel/blocks/backup/Backup.cpp
storage/ndb/src/kernel/blocks/backup/Backup.cpp
+81
-66
storage/ndb/src/kernel/blocks/backup/Backup.hpp
storage/ndb/src/kernel/blocks/backup/Backup.hpp
+1
-0
No files found.
storage/ndb/src/kernel/blocks/backup/Backup.cpp
View file @
8fb56fbc
...
...
@@ -223,6 +223,7 @@ Backup::execCONTINUEB(Signal* signal)
}
case
BackupContinueB
:
:
BACKUP_FRAGMENT_INFO
:
{
jam
();
const
Uint32
ptr_I
=
Tdata1
;
Uint32
tabPtr_I
=
Tdata2
;
Uint32
fragPtr_I
=
signal
->
theData
[
3
];
...
...
@@ -231,6 +232,10 @@ Backup::execCONTINUEB(Signal* signal)
c_backupPool
.
getPtr
(
ptr
,
ptr_I
);
TablePtr
tabPtr
;
ptr
.
p
->
tables
.
getPtr
(
tabPtr
,
tabPtr_I
);
if
(
fragPtr_I
!=
tabPtr
.
p
->
fragments
.
getSize
())
{
jam
();
FragmentPtr
fragPtr
;
tabPtr
.
p
->
fragments
.
getPtr
(
fragPtr
,
fragPtr_I
);
...
...
@@ -259,6 +264,8 @@ Backup::execCONTINUEB(Signal* signal)
filePtr
.
p
->
operation
.
dataBuffer
.
updateWritePtr
(
sz
);
fragPtr_I
++
;
}
if
(
fragPtr_I
==
tabPtr
.
p
->
fragments
.
getSize
())
{
signal
->
theData
[
0
]
=
tabPtr
.
p
->
tableId
;
...
...
@@ -269,10 +276,12 @@ Backup::execCONTINUEB(Signal* signal)
ptr
.
p
->
tables
.
next
(
tabPtr
);
if
((
tabPtr_I
=
tabPtr
.
i
)
==
RNIL
)
{
jam
();
closeFiles
(
signal
,
ptr
);
return
;
}
}
signal
->
theData
[
0
]
=
BackupContinueB
::
BACKUP_FRAGMENT_INFO
;
signal
->
theData
[
1
]
=
ptr_I
;
signal
->
theData
[
2
]
=
tabPtr_I
;
...
...
@@ -2037,14 +2046,21 @@ Backup::sendDropTrig(Signal* signal, BackupRecordPtr ptr)
{
TablePtr
tabPtr
;
ptr
.
p
->
tables
.
first
(
tabPtr
);
if
(
ptr
.
p
->
tables
.
first
(
tabPtr
))
{
jam
();
signal
->
theData
[
0
]
=
BackupContinueB
::
BACKUP_FRAGMENT_INFO
;
signal
->
theData
[
1
]
=
ptr
.
i
;
signal
->
theData
[
2
]
=
tabPtr
.
i
;
signal
->
theData
[
3
]
=
0
;
sendSignal
(
BACKUP_REF
,
GSN_CONTINUEB
,
signal
,
4
,
JBB
);
}
else
{
jam
();
closeFiles
(
signal
,
ptr
);
}
}
}
}
}
...
...
@@ -2362,19 +2378,10 @@ Backup::defineBackupRef(Signal* signal, BackupRecordPtr ptr, Uint32 errCode)
{
jam
();
ndbrequire
(
!
(
filePtr
.
p
->
m_flags
&
BackupFile
::
BF_FILE_THREAD
));
ndbrequire
(
!
(
filePtr
.
p
->
m_flags
&
BackupFile
::
BF_CLOSING
));
filePtr
.
p
->
m_flags
&=
~
(
Uint32
)
BackupFile
::
BF_LCP_META
;
if
(
filePtr
.
p
->
m_flags
&
BackupFile
::
BF_OPEN
)
{
filePtr
.
p
->
m_flags
|=
BackupFile
::
BF_CLOSING
;
FsCloseReq
*
req
=
(
FsCloseReq
*
)
signal
->
getDataPtrSend
();
req
->
filePointer
=
filePtr
.
p
->
filePointer
;
req
->
userPointer
=
filePtr
.
i
;
req
->
userReference
=
reference
();
req
->
fileFlag
=
0
;
FsCloseReq
::
setRemoveFileFlag
(
req
->
fileFlag
,
1
);
sendSignal
(
NDBFS_REF
,
GSN_FSCLOSEREQ
,
signal
,
FsCloseReq
::
SignalLength
,
JBA
);
closeFile
(
signal
,
ptr
,
filePtr
);
return
;
}
}
...
...
@@ -4080,29 +4087,10 @@ Backup::checkFile(Signal* signal, BackupFilePtr filePtr)
ndbrequire
(
flags
&
BackupFile
::
BF_OPEN
);
ndbrequire
(
flags
&
BackupFile
::
BF_FILE_THREAD
);
ndbrequire
(
!
(
flags
&
BackupFile
::
BF_CLOSING
));
filePtr
.
p
->
m_flags
|=
BackupFile
::
BF_CLOSING
;
FsCloseReq
*
req
=
(
FsCloseReq
*
)
signal
->
getDataPtrSend
();
req
->
filePointer
=
filePtr
.
p
->
filePointer
;
req
->
userPointer
=
filePtr
.
i
;
req
->
userReference
=
reference
();
req
->
fileFlag
=
0
;
BackupRecordPtr
ptr
;
c_backupPool
.
getPtr
(
ptr
,
filePtr
.
p
->
backupPtr
);
if
(
ptr
.
p
->
errorCode
)
{
FsCloseReq
::
setRemoveFileFlag
(
req
->
fileFlag
,
1
);
}
#ifdef DEBUG_ABORT
ndbout_c
(
"***** a FSCLOSEREQ filePtr.i = %u run=%d cl=%d"
,
filePtr
.
i
,
running
,
closing
);
#endif
sendSignal
(
NDBFS_REF
,
GSN_FSCLOSEREQ
,
signal
,
FsCloseReq
::
SignalLength
,
JBA
);
closeFile
(
signal
,
ptr
,
filePtr
);
}
...
...
@@ -4367,7 +4355,7 @@ Backup::closeFiles(Signal* sig, BackupRecordPtr ptr)
else
{
jam
();
c
heckFile
(
sig
,
filePtr
);
// make sure we write everything before closing
c
loseFile
(
sig
,
ptr
,
filePtr
);
}
}
...
...
@@ -4377,6 +4365,33 @@ Backup::closeFiles(Signal* sig, BackupRecordPtr ptr)
}
//if
}
void
Backup
::
closeFile
(
Signal
*
signal
,
BackupRecordPtr
ptr
,
BackupFilePtr
filePtr
)
{
ndbrequire
(
filePtr
.
p
->
m_flags
&
BackupFile
::
BF_OPEN
);
ndbrequire
(
!
(
filePtr
.
p
->
m_flags
&
BackupFile
::
BF_OPENING
));
ndbrequire
(
!
(
filePtr
.
p
->
m_flags
&
BackupFile
::
BF_CLOSING
));
filePtr
.
p
->
m_flags
|=
BackupFile
::
BF_CLOSING
;
FsCloseReq
*
req
=
(
FsCloseReq
*
)
signal
->
getDataPtrSend
();
req
->
filePointer
=
filePtr
.
p
->
filePointer
;
req
->
userPointer
=
filePtr
.
i
;
req
->
userReference
=
reference
();
req
->
fileFlag
=
0
;
if
(
ptr
.
p
->
errorCode
)
{
FsCloseReq
::
setRemoveFileFlag
(
req
->
fileFlag
,
1
);
}
#ifdef DEBUG_ABORT
ndbout_c
(
"***** a FSCLOSEREQ filePtr.i = %u flags: %x"
,
filePtr
.
i
,
filePtr
.
p
->
m_flags
);
#endif
sendSignal
(
NDBFS_REF
,
GSN_FSCLOSEREQ
,
signal
,
FsCloseReq
::
SignalLength
,
JBA
);
}
void
Backup
::
execFSCLOSEREF
(
Signal
*
signal
)
{
...
...
storage/ndb/src/kernel/blocks/backup/Backup.hpp
View file @
8fb56fbc
...
...
@@ -582,6 +582,7 @@ public:
void
openFiles
(
Signal
*
signal
,
BackupRecordPtr
ptr
);
void
openFilesReply
(
Signal
*
,
BackupRecordPtr
ptr
,
BackupFilePtr
);
void
closeFiles
(
Signal
*
,
BackupRecordPtr
ptr
);
void
closeFile
(
Signal
*
,
BackupRecordPtr
,
BackupFilePtr
);
void
closeFilesDone
(
Signal
*
,
BackupRecordPtr
ptr
);
void
sendDefineBackupReq
(
Signal
*
signal
,
BackupRecordPtr
ptr
);
...
...
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