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
e97b67c2
Commit
e97b67c2
authored
18 years ago
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb -
fix bug#19244, dd page got locked in page cache likely fix bug 18780
parent
ba10d4c7
Branches unavailable
Tags unavailable
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
4 deletions
+37
-4
storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
+29
-4
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
+8
-0
No files found.
storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
View file @
e97b67c2
...
...
@@ -473,13 +473,16 @@ void Dbtup::execTUP_COMMITREQ(Signal* signal)
ptrCheckGuard
(
regTabPtr
,
no_of_tablerec
,
tablerec
);
PagePtr
page
;
Tuple_header
*
tuple_ptr
=
0
;
Tuple_header
*
tuple_ptr
=
(
Tuple_header
*
)
get_ptr
(
&
page
,
&
regOperPtr
.
p
->
m_tuple_location
,
regTabPtr
.
p
);
bool
get_page
=
false
;
if
(
regOperPtr
.
p
->
op_struct
.
m_load_diskpage_on_commit
)
{
Page_cache_client
::
Request
req
;
ndbassert
(
regOperPtr
.
p
->
is_first_operation
()
&&
regOperPtr
.
p
->
is_last_operation
());
Page_cache_client
::
Request
req
;
/**
* Check for page
*/
...
...
@@ -490,15 +493,33 @@ void Dbtup::execTUP_COMMITREQ(Signal* signal)
memcpy
(
&
req
.
m_page
,
tmp
->
get_disk_ref_ptr
(
regTabPtr
.
p
),
sizeof
(
Local_key
));
if
(
unlikely
(
regOperPtr
.
p
->
op_struct
.
op_type
==
ZDELETE
&&
tmp
->
m_header_bits
&
Tuple_header
::
DISK_ALLOC
))
{
jam
();
/**
* Insert+Delete
*/
regOperPtr
.
p
->
op_struct
.
m_load_diskpage_on_commit
=
0
;
regOperPtr
.
p
->
op_struct
.
m_wait_log_buffer
=
0
;
disk_page_abort_prealloc
(
signal
,
regFragPtr
.
p
,
&
req
.
m_page
,
req
.
m_page
.
m_page_idx
);
c_lgman
->
free_log_space
(
regFragPtr
.
p
->
m_logfile_group_id
,
regOperPtr
.
p
->
m_undo_buffer_space
);
ndbout_c
(
"insert+delete"
);
goto
skip_disk
;
}
}
else
{
// initial delete
ndbassert
(
regOperPtr
.
p
->
op_struct
.
op_type
==
ZDELETE
);
tuple_ptr
=
(
Tuple_header
*
)
get_ptr
(
&
page
,
&
regOperPtr
.
p
->
m_tuple_location
,
regTabPtr
.
p
);
memcpy
(
&
req
.
m_page
,
tuple_ptr
->
get_disk_ref_ptr
(
regTabPtr
.
p
),
sizeof
(
Local_key
));
ndbassert
(
tuple_ptr
->
m_header_bits
&
Tuple_header
::
DISK_PART
);
}
req
.
m_callback
.
m_callbackData
=
regOperPtr
.
i
;
req
.
m_callback
.
m_callbackFunction
=
...
...
@@ -522,6 +543,7 @@ void Dbtup::execTUP_COMMITREQ(Signal* signal)
ndbrequire
(
"NOT YET IMPLEMENTED"
==
0
);
break
;
}
get_page
=
true
;
disk_page_set_dirty
(
*
(
Ptr
<
Page
>*
)
&
m_pgman
.
m_ptr
);
regOperPtr
.
p
->
m_commit_disk_callback_page
=
res
;
regOperPtr
.
p
->
op_struct
.
m_load_diskpage_on_commit
=
0
;
...
...
@@ -555,6 +577,7 @@ void Dbtup::execTUP_COMMITREQ(Signal* signal)
tuple_ptr
=
(
Tuple_header
*
)
get_ptr
(
&
page
,
&
regOperPtr
.
p
->
m_tuple_location
,
regTabPtr
.
p
);
}
skip_disk:
req_struct
.
m_tuple_ptr
=
tuple_ptr
;
if
(
get_tuple_state
(
regOperPtr
.
p
)
==
TUPLE_PREPARED
)
...
...
@@ -599,6 +622,8 @@ void Dbtup::execTUP_COMMITREQ(Signal* signal)
else
{
removeActiveOpList
(
regOperPtr
.
p
,
tuple_ptr
);
if
(
get_page
)
ndbassert
(
tuple_ptr
->
m_header_bits
&
Tuple_header
::
DISK_PART
);
dealloc_tuple
(
signal
,
gci
,
page
.
p
,
tuple_ptr
,
regOperPtr
.
p
,
regFragPtr
.
p
,
regTabPtr
.
p
);
}
...
...
This diff is collapsed.
Click to expand it.
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
View file @
e97b67c2
...
...
@@ -1053,6 +1053,7 @@ Dbtup::disk_page_abort_prealloc_callback(Signal* signal,
Ptr
<
Fragrecord
>
fragPtr
;
getFragmentrec
(
fragPtr
,
pagePtr
.
p
->
m_fragment_id
,
tabPtr
.
p
);
disk_page_set_dirty
(
pagePtr
);
disk_page_abort_prealloc_callback_1
(
signal
,
fragPtr
.
p
,
pagePtr
,
sz
);
}
...
...
@@ -1074,6 +1075,13 @@ Dbtup::disk_page_abort_prealloc_callback_1(Signal* signal,
ddassert
(
alloc
.
calc_page_free_bits
(
free
-
used
)
==
old_idx
);
Uint32
new_idx
=
alloc
.
calc_page_free_bits
(
free
-
used
+
sz
);
#ifdef VM_TRACE
Local_key
key
;
key
.
m_page_no
=
pagePtr
.
p
->
m_page_no
;
key
.
m_file_no
=
pagePtr
.
p
->
m_file_no
;
ndbout
<<
"disk_page_abort_prealloc_callback_1"
<<
key
<<
endl
;
#endif
Ptr
<
Extent_info
>
extentPtr
;
c_extent_pool
.
getPtr
(
extentPtr
,
ext
);
if
(
old_idx
!=
new_idx
)
...
...
This diff is collapsed.
Click to expand it.
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