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
4630f67e
Commit
4630f67e
authored
Jan 25, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug#16771 - ndb dd - fix leak of extents
parent
1e355912
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
177 additions
and
51 deletions
+177
-51
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
+2
-1
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
+155
-50
storage/ndb/src/kernel/blocks/pgman.cpp
storage/ndb/src/kernel/blocks/pgman.cpp
+20
-0
No files found.
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
View file @
4630f67e
...
@@ -565,7 +565,6 @@ typedef Ptr<Fragoperrec> FragoperrecPtr;
...
@@ -565,7 +565,6 @@ typedef Ptr<Fragoperrec> FragoperrecPtr;
*
*
*/
*/
STATIC_CONST
(
SZ
=
EXTENT_SEARCH_MATRIX_SIZE
);
STATIC_CONST
(
SZ
=
EXTENT_SEARCH_MATRIX_SIZE
);
Uint32
m_extent_search_matrix
[
SZ
];
// 4x4
DLList
<
Extent_info
>::
Head
m_free_extents
[
SZ
];
DLList
<
Extent_info
>::
Head
m_free_extents
[
SZ
];
Uint32
m_total_extent_free_space_thresholds
[
EXTENT_SEARCH_MATRIX_ROWS
];
Uint32
m_total_extent_free_space_thresholds
[
EXTENT_SEARCH_MATRIX_ROWS
];
Uint32
m_page_free_bits_map
[
EXTENT_SEARCH_MATRIX_COLS
];
Uint32
m_page_free_bits_map
[
EXTENT_SEARCH_MATRIX_COLS
];
...
@@ -593,6 +592,8 @@ typedef Ptr<Fragoperrec> FragoperrecPtr;
...
@@ -593,6 +592,8 @@ typedef Ptr<Fragoperrec> FragoperrecPtr;
SLList
<
Extent_info
,
Extent_list_t
>::
Head
m_extent_list
;
SLList
<
Extent_info
,
Extent_list_t
>::
Head
m_extent_list
;
};
};
void
dump_disk_alloc
(
Disk_alloc_info
&
);
struct
Fragrecord
{
struct
Fragrecord
{
Uint32
nextStartRange
;
Uint32
nextStartRange
;
Uint32
currentPageRange
;
Uint32
currentPageRange
;
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
View file @
4630f67e
This diff is collapsed.
Click to expand it.
storage/ndb/src/kernel/blocks/pgman.cpp
View file @
4630f67e
...
@@ -40,6 +40,12 @@
...
@@ -40,6 +40,12 @@
#define dbg(x)
#define dbg(x)
#endif
#endif
#if 1
#define DBG_LCP(x)
#else
#define DBG_LCP(x) ndbout << x
#endif
Pgman
::
Pgman
(
const
Configuration
&
conf
)
:
Pgman
::
Pgman
(
const
Configuration
&
conf
)
:
SimulatedBlock
(
PGMAN
,
conf
),
SimulatedBlock
(
PGMAN
,
conf
),
m_file_map
(
m_data_buffer_pool
),
m_file_map
(
m_data_buffer_pool
),
...
@@ -1083,6 +1089,7 @@ Pgman::execLCP_FRAG_ORD(Signal* signal)
...
@@ -1083,6 +1089,7 @@ Pgman::execLCP_FRAG_ORD(Signal* signal)
LcpFragOrd
*
ord
=
(
LcpFragOrd
*
)
signal
->
getDataPtr
();
LcpFragOrd
*
ord
=
(
LcpFragOrd
*
)
signal
->
getDataPtr
();
ndbrequire
(
ord
->
lcpId
>=
m_last_lcp_complete
+
1
||
m_last_lcp_complete
==
0
);
ndbrequire
(
ord
->
lcpId
>=
m_last_lcp_complete
+
1
||
m_last_lcp_complete
==
0
);
m_last_lcp
=
ord
->
lcpId
;
m_last_lcp
=
ord
->
lcpId
;
DBG_LCP
(
"execLCP_FRAG_ORD"
<<
endl
);
ndbrequire
(
!
m_lcp_outstanding
);
ndbrequire
(
!
m_lcp_outstanding
);
ndbrequire
(
m_lcp_copy_page_free
);
ndbrequire
(
m_lcp_copy_page_free
);
...
@@ -1104,6 +1111,8 @@ Pgman::execEND_LCP_REQ(Signal* signal)
...
@@ -1104,6 +1111,8 @@ Pgman::execEND_LCP_REQ(Signal* signal)
EndLcpReq
*
req
=
(
EndLcpReq
*
)
signal
->
getDataPtr
();
EndLcpReq
*
req
=
(
EndLcpReq
*
)
signal
->
getDataPtr
();
m_end_lcp_req
=
*
req
;
m_end_lcp_req
=
*
req
;
DBG_LCP
(
"execEND_LCP_REQ"
<<
endl
);
#ifdef VM_TRACE
#ifdef VM_TRACE
debugOut
debugOut
<<
"PGMAN: execEND_LCP_REQ"
<<
"PGMAN: execEND_LCP_REQ"
...
@@ -1117,6 +1126,7 @@ Pgman::execEND_LCP_REQ(Signal* signal)
...
@@ -1117,6 +1126,7 @@ Pgman::execEND_LCP_REQ(Signal* signal)
ndbrequire
(
!
m_lcp_loop_on
);
ndbrequire
(
!
m_lcp_loop_on
);
signal
->
theData
[
0
]
=
m_end_lcp_req
.
senderData
;
signal
->
theData
[
0
]
=
m_end_lcp_req
.
senderData
;
sendSignal
(
m_end_lcp_req
.
senderRef
,
GSN_END_LCP_CONF
,
signal
,
1
,
JBB
);
sendSignal
(
m_end_lcp_req
.
senderRef
,
GSN_END_LCP_CONF
,
signal
,
1
,
JBB
);
DBG_LCP
(
"GSN_END_LCP_CONF"
<<
endl
);
}
}
m_last_lcp_complete
=
m_last_lcp
;
m_last_lcp_complete
=
m_last_lcp
;
...
@@ -1149,6 +1159,8 @@ Pgman::process_lcp(Signal* signal)
...
@@ -1149,6 +1159,8 @@ Pgman::process_lcp(Signal* signal)
Ptr
<
Page_entry
>&
ptr
=
iter
.
curr
;
Ptr
<
Page_entry
>&
ptr
=
iter
.
curr
;
Uint16
state
=
ptr
.
p
->
m_state
;
Uint16
state
=
ptr
.
p
->
m_state
;
DBG_LCP
(
"PROCESS LCP: "
<<
ptr
);
if
(
ptr
.
p
->
m_last_lcp
<
m_last_lcp
&&
if
(
ptr
.
p
->
m_last_lcp
<
m_last_lcp
&&
(
state
&
Page_entry
::
DIRTY
))
(
state
&
Page_entry
::
DIRTY
))
{
{
...
@@ -1159,6 +1171,7 @@ Pgman::process_lcp(Signal* signal)
...
@@ -1159,6 +1171,7 @@ Pgman::process_lcp(Signal* signal)
}
}
if
(
state
&
Page_entry
::
BUSY
)
if
(
state
&
Page_entry
::
BUSY
)
{
{
DBG_LCP
(
" BUSY"
<<
endl
);
break
;
// wait for it
break
;
// wait for it
}
}
if
(
state
&
Page_entry
::
LOCKED
)
if
(
state
&
Page_entry
::
LOCKED
)
...
@@ -1169,6 +1182,7 @@ Pgman::process_lcp(Signal* signal)
...
@@ -1169,6 +1182,7 @@ Pgman::process_lcp(Signal* signal)
*/
*/
if
(
!
m_lcp_copy_page_free
)
if
(
!
m_lcp_copy_page_free
)
{
{
DBG_LCP
(
" !m_lcp_copy_page_free"
<<
endl
);
break
;
break
;
}
}
m_lcp_copy_page_free
=
false
;
m_lcp_copy_page_free
=
false
;
...
@@ -1183,10 +1197,12 @@ Pgman::process_lcp(Signal* signal)
...
@@ -1183,10 +1197,12 @@ Pgman::process_lcp(Signal* signal)
}
}
else
if
(
state
&
Page_entry
::
PAGEOUT
)
else
if
(
state
&
Page_entry
::
PAGEOUT
)
{
{
DBG_LCP
(
" PAGEOUT -> state |= LCP"
<<
endl
);
set_page_state
(
ptr
,
state
|
Page_entry
::
LCP
);
set_page_state
(
ptr
,
state
|
Page_entry
::
LCP
);
}
}
else
else
{
{
DBG_LCP
(
" pageout()"
<<
endl
);
ptr
.
p
->
m_state
|=
Page_entry
::
LCP
;
ptr
.
p
->
m_state
|=
Page_entry
::
LCP
;
pageout
(
signal
,
ptr
);
pageout
(
signal
,
ptr
);
}
}
...
@@ -1205,11 +1221,15 @@ Pgman::process_lcp(Signal* signal)
...
@@ -1205,11 +1221,15 @@ Pgman::process_lcp(Signal* signal)
{
{
signal
->
theData
[
0
]
=
m_end_lcp_req
.
senderData
;
signal
->
theData
[
0
]
=
m_end_lcp_req
.
senderData
;
sendSignal
(
m_end_lcp_req
.
senderRef
,
GSN_END_LCP_CONF
,
signal
,
1
,
JBB
);
sendSignal
(
m_end_lcp_req
.
senderRef
,
GSN_END_LCP_CONF
,
signal
,
1
,
JBB
);
DBG_LCP
(
"GSN_END_LCP_CONF"
<<
endl
);
}
}
DBG_LCP
(
" -- RETURN FALSE"
<<
endl
);
m_last_lcp_complete
=
m_last_lcp
;
m_last_lcp_complete
=
m_last_lcp
;
m_lcp_curr_bucket
=
~
(
Uint32
)
0
;
m_lcp_curr_bucket
=
~
(
Uint32
)
0
;
return
false
;
return
false
;
}
}
DBG_LCP
(
" -- RETURN TRUE"
<<
endl
);
return
true
;
return
true
;
}
}
...
...
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