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
964bf6d5
Commit
964bf6d5
authored
Aug 02, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb -
make Dblqh use OM_AUTO_SYNC
parent
83eca6b4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
26 deletions
+14
-26
storage/ndb/include/kernel/signaldata/FsOpenReq.hpp
storage/ndb/include/kernel/signaldata/FsOpenReq.hpp
+1
-0
storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
+1
-5
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+12
-14
storage/ndb/src/kernel/vm/pc.hpp
storage/ndb/src/kernel/vm/pc.hpp
+0
-7
No files found.
storage/ndb/include/kernel/signaldata/FsOpenReq.hpp
View file @
964bf6d5
...
...
@@ -43,6 +43,7 @@ class FsOpenReq {
friend
class
Lgman
;
friend
class
Tsman
;
friend
class
Restore
;
friend
class
Dblqh
;
/**
* For printing
...
...
storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
View file @
964bf6d5
...
...
@@ -29,6 +29,7 @@
#include <signaldata/LCP.hpp>
#include <signaldata/LqhTransConf.hpp>
#include <signaldata/LqhFrag.hpp>
#include <signaldata/FsOpenReq.hpp>
// primary key is stored in TUP
#include "../dbtup/Dbtup.hpp"
...
...
@@ -1515,11 +1516,6 @@ public:
/**
* This variable contains the last word written in the last page.
*/
UintR
logFilePagesToDiskWithoutSynch
;
/**
* This variable keeps track of the number of pages written since
* last synch on this log file.
*/
LogFileStatus
logFileStatus
;
/**
* A reference to page zero in this file.
...
...
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
964bf6d5
...
...
@@ -12415,7 +12415,6 @@ void Dblqh::initFsopenconf(Signal* signal)
ptrCheckGuard
(
logPartPtr
,
clogPartFileSize
,
logPartRecord
);
logFilePtr
.
p
->
currentMbyte
=
0
;
logFilePtr
.
p
->
filePosition
=
0
;
logFilePtr
.
p
->
logFilePagesToDiskWithoutSynch
=
0
;
}
//Dblqh::initFsopenconf()
/* ========================================================================= */
...
...
@@ -13062,14 +13061,16 @@ void Dblqh::initLogpage(Signal* signal)
/* ------------------------------------------------------------------------- */
void
Dblqh
::
openFileRw
(
Signal
*
signal
,
LogFileRecordPtr
olfLogFilePtr
)
{
FsOpenReq
*
req
=
(
FsOpenReq
*
)
signal
->
getDataPtrSend
();
signal
->
theData
[
0
]
=
cownref
;
signal
->
theData
[
1
]
=
olfLogFilePtr
.
i
;
signal
->
theData
[
2
]
=
olfLogFilePtr
.
p
->
fileName
[
0
];
signal
->
theData
[
3
]
=
olfLogFilePtr
.
p
->
fileName
[
1
];
signal
->
theData
[
4
]
=
olfLogFilePtr
.
p
->
fileName
[
2
];
signal
->
theData
[
5
]
=
olfLogFilePtr
.
p
->
fileName
[
3
];
signal
->
theData
[
6
]
=
ZOPEN_READ_WRITE
;
sendSignal
(
NDBFS_REF
,
GSN_FSOPENREQ
,
signal
,
7
,
JBA
);
signal
->
theData
[
6
]
=
ZOPEN_READ_WRITE
|
FsOpenReq
::
OM_AUTOSYNC
;
req
->
auto_sync_size
=
MAX_REDO_PAGES_WITHOUT_SYNCH
*
sizeof
(
LogPageRecord
);
sendSignal
(
NDBFS_REF
,
GSN_FSOPENREQ
,
signal
,
FsOpenReq
::
SignalLength
,
JBA
);
}
//Dblqh::openFileRw()
/* ------------------------------------------------------------------------- */
...
...
@@ -13080,14 +13081,16 @@ void Dblqh::openFileRw(Signal* signal, LogFileRecordPtr olfLogFilePtr)
void
Dblqh
::
openLogfileInit
(
Signal
*
signal
)
{
logFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPENING_INIT
;
FsOpenReq
*
req
=
(
FsOpenReq
*
)
signal
->
getDataPtrSend
();
signal
->
theData
[
0
]
=
cownref
;
signal
->
theData
[
1
]
=
logFilePtr
.
i
;
signal
->
theData
[
2
]
=
logFilePtr
.
p
->
fileName
[
0
];
signal
->
theData
[
3
]
=
logFilePtr
.
p
->
fileName
[
1
];
signal
->
theData
[
4
]
=
logFilePtr
.
p
->
fileName
[
2
];
signal
->
theData
[
5
]
=
logFilePtr
.
p
->
fileName
[
3
];
signal
->
theData
[
6
]
=
0x302
;
sendSignal
(
NDBFS_REF
,
GSN_FSOPENREQ
,
signal
,
7
,
JBA
);
signal
->
theData
[
6
]
=
0x302
|
FsOpenReq
::
OM_AUTOSYNC
;
req
->
auto_sync_size
=
MAX_REDO_PAGES_WITHOUT_SYNCH
*
sizeof
(
LogPageRecord
);
sendSignal
(
NDBFS_REF
,
GSN_FSOPENREQ
,
signal
,
FsOpenReq
::
SignalLength
,
JBA
);
}
//Dblqh::openLogfileInit()
/* OPEN FOR READ/WRITE, DO CREATE AND DO TRUNCATE FILE */
...
...
@@ -13114,14 +13117,16 @@ void Dblqh::openNextLogfile(Signal* signal)
return
;
}
//if
onlLogFilePtr
.
p
->
logFileStatus
=
LogFileRecord
::
OPENING_WRITE_LOG
;
FsOpenReq
*
req
=
(
FsOpenReq
*
)
signal
->
getDataPtrSend
();
signal
->
theData
[
0
]
=
cownref
;
signal
->
theData
[
1
]
=
onlLogFilePtr
.
i
;
signal
->
theData
[
2
]
=
onlLogFilePtr
.
p
->
fileName
[
0
];
signal
->
theData
[
3
]
=
onlLogFilePtr
.
p
->
fileName
[
1
];
signal
->
theData
[
4
]
=
onlLogFilePtr
.
p
->
fileName
[
2
];
signal
->
theData
[
5
]
=
onlLogFilePtr
.
p
->
fileName
[
3
];
signal
->
theData
[
6
]
=
2
;
sendSignal
(
NDBFS_REF
,
GSN_FSOPENREQ
,
signal
,
7
,
JBA
);
signal
->
theData
[
6
]
=
2
|
FsOpenReq
::
OM_AUTOSYNC
;
req
->
auto_sync_size
=
MAX_REDO_PAGES_WITHOUT_SYNCH
*
sizeof
(
LogPageRecord
);
sendSignal
(
NDBFS_REF
,
GSN_FSOPENREQ
,
signal
,
FsOpenReq
::
SignalLength
,
JBA
);
}
//if
}
//Dblqh::openNextLogfile()
...
...
@@ -16138,15 +16143,8 @@ void Dblqh::completedLogPage(Signal* signal, Uint32 clpType, Uint32 place)
signal
->
theData
[
0
]
=
logFilePtr
.
p
->
fileRef
;
signal
->
theData
[
1
]
=
cownref
;
signal
->
theData
[
2
]
=
lfoPtr
.
i
;
logFilePtr
.
p
->
logFilePagesToDiskWithoutSynch
+=
twlpNoPages
;
if
(
twlpType
==
ZLAST_WRITE_IN_FILE
)
{
jam
();
logFilePtr
.
p
->
logFilePagesToDiskWithoutSynch
=
0
;
signal
->
theData
[
3
]
=
ZLIST_OF_MEM_PAGES_SYNCH
;
}
else
if
(
logFilePtr
.
p
->
logFilePagesToDiskWithoutSynch
>
MAX_REDO_PAGES_WITHOUT_SYNCH
)
{
jam
();
logFilePtr
.
p
->
logFilePagesToDiskWithoutSynch
=
0
;
signal
->
theData
[
3
]
=
ZLIST_OF_MEM_PAGES_SYNCH
;
}
else
{
jam
();
...
...
storage/ndb/src/kernel/vm/pc.hpp
View file @
964bf6d5
...
...
@@ -163,17 +163,10 @@
#define NO_OF_FRAGS_PER_CHUNK 4
#define LOG_NO_OF_FRAGS_PER_CHUNK 2
/**
* Page Header Size for pages
*/
#define ZPAGE_HEADER_SIZE 32
#define ZPAGE_FRAG_PAGE_ID_POS 4
/* POSITION OF FRAG PAGE ID WHEN USED*/
/* ---------------------------------------------------------------- */
// To avoid synching too big chunks at a time we synch after writing
// a certain number of data/UNDO pages. (e.g. 2 MBytes).
/* ---------------------------------------------------------------- */
#define MAX_PAGES_WITHOUT_SYNCH 64
#define MAX_REDO_PAGES_WITHOUT_SYNCH 32
/* ------------------------------------------------------------------ */
...
...
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