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
2633c538
Commit
2633c538
authored
Mar 21, 2007
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct event buffer status reporting
parent
2544b595
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
storage/ndb/src/common/debugger/EventLogger.cpp
storage/ndb/src/common/debugger/EventLogger.cpp
+2
-2
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
+6
-4
No files found.
storage/ndb/src/common/debugger/EventLogger.cpp
View file @
2633c538
...
@@ -652,9 +652,9 @@ void getTextEventBufferStatus(QQQQ) {
...
@@ -652,9 +652,9 @@ void getTextEventBufferStatus(QQQQ) {
"Event buffer status: used=%d%s(%d%) alloc=%d%s(%d%) "
"Event buffer status: used=%d%s(%d%) alloc=%d%s(%d%) "
"max=%d%s apply_gci=%lld latest_gci=%lld"
,
"max=%d%s apply_gci=%lld latest_gci=%lld"
,
used
,
used_unit
,
used
,
used_unit
,
theData
[
2
]
?
(
theData
[
1
]
*
100
)
/
theData
[
2
]
:
0
,
theData
[
2
]
?
(
Uint32
)((((
Uint64
)
theData
[
1
])
*
100
)
/
theData
[
2
])
:
0
,
alloc
,
alloc_unit
,
alloc
,
alloc_unit
,
theData
[
3
]
?
(
theData
[
2
]
*
100
)
/
theData
[
3
]
:
0
,
theData
[
3
]
?
(
Uint32
)((((
Uint64
)
theData
[
2
])
*
100
)
/
theData
[
3
])
:
0
,
max_
,
max_unit
,
max_
,
max_unit
,
theData
[
4
]
+
(((
Uint64
)
theData
[
5
])
<<
32
),
theData
[
4
]
+
(((
Uint64
)
theData
[
5
])
<<
32
),
theData
[
6
]
+
(((
Uint64
)
theData
[
7
])
<<
32
));
theData
[
6
]
+
(((
Uint64
)
theData
[
7
])
<<
32
));
...
...
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
View file @
2633c538
...
@@ -2100,15 +2100,17 @@ NdbEventBuffer::alloc_mem(EventBufData* data,
...
@@ -2100,15 +2100,17 @@ NdbEventBuffer::alloc_mem(EventBufData* data,
NdbMem_Free
((
char
*
)
data
->
memory
);
NdbMem_Free
((
char
*
)
data
->
memory
);
assert
(
m_total_alloc
>=
data
->
sz
);
assert
(
m_total_alloc
>=
data
->
sz
);
m_total_alloc
-=
data
->
sz
;
data
->
memory
=
0
;
data
->
memory
=
0
;
data
->
sz
=
0
;
data
->
sz
=
0
;
data
->
memory
=
(
Uint32
*
)
NdbMem_Allocate
(
alloc_size
);
data
->
memory
=
(
Uint32
*
)
NdbMem_Allocate
(
alloc_size
);
if
(
data
->
memory
==
0
)
if
(
data
->
memory
==
0
)
{
m_total_alloc
-=
data
->
sz
;
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
}
data
->
sz
=
alloc_size
;
data
->
sz
=
alloc_size
;
m_total_alloc
+=
data
->
sz
;
m_total_alloc
+=
add_
sz
;
if
(
change_sz
!=
NULL
)
if
(
change_sz
!=
NULL
)
*
change_sz
+=
add_sz
;
*
change_sz
+=
add_sz
;
...
@@ -2780,7 +2782,7 @@ NdbEventBuffer::reportStatus()
...
@@ -2780,7 +2782,7 @@ NdbEventBuffer::reportStatus()
else
else
apply_gci
=
latest_gci
;
apply_gci
=
latest_gci
;
if
(
100
*
m_free_data_sz
<
m_min_free_thresh
*
m_total_alloc
&&
if
(
100
*
(
Uint64
)
m_free_data_sz
<
m_min_free_thresh
*
(
Uint64
)
m_total_alloc
&&
m_total_alloc
>
1024
*
1024
)
m_total_alloc
>
1024
*
1024
)
{
{
/* report less free buffer than m_free_thresh,
/* report less free buffer than m_free_thresh,
...
@@ -2791,7 +2793,7 @@ NdbEventBuffer::reportStatus()
...
@@ -2791,7 +2793,7 @@ NdbEventBuffer::reportStatus()
goto
send_report
;
goto
send_report
;
}
}
if
(
100
*
m_free_data_sz
>
m_max_free_thresh
*
m_total_alloc
&&
if
(
100
*
(
Uint64
)
m_free_data_sz
>
m_max_free_thresh
*
(
Uint64
)
m_total_alloc
&&
m_total_alloc
>
1024
*
1024
)
m_total_alloc
>
1024
*
1024
)
{
{
/* report more free than 2 * m_free_thresh
/* report more free than 2 * m_free_thresh
...
...
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