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
55ced3bf
Commit
55ced3bf
authored
Sep 22, 2007
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add debug prints in the new cachetable
git-svn-id:
file:///svn/tokudb@340
c7de825b-a66e-492c-adef-691d508d4ae1
parent
71c518a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
newbrt/brt.c
newbrt/brt.c
+1
-1
newbrt/cachetable.c
newbrt/cachetable.c
+10
-1
No files found.
newbrt/brt.c
View file @
55ced3bf
...
...
@@ -1075,7 +1075,7 @@ enum {n_nodes_in_cache =127};
int
brt_create_cachetable
(
CACHETABLE
*
ct
,
int
cachelines
)
{
if
(
cachelines
==
0
)
cachelines
=
n_nodes_in_cache
;
assert
(
cachelines
>
0
);
return
brt_create_cachetable_size
(
ct
,
cachelines
,
cachelines
*
1024
*
1024
);
return
brt_create_cachetable_size
(
ct
,
cachelines
,
(
cachelines
+
1
)
*
1024
*
1024
);
}
static
int
setup_brt_root_node
(
BRT
t
,
diskoff
offset
)
{
...
...
newbrt/cachetable.c
View file @
55ced3bf
...
...
@@ -248,9 +248,13 @@ static void flush_and_keep (PAIR flush_me) {
}
}
static
int
maybe_flush_some
(
CACHETABLE
t
,
long
size
)
{
static
int
maybe_flush_some
(
CACHETABLE
t
,
long
size
__attribute__
((
unused
))
)
{
again:
#if 0
if (t->n_in_table >= t->table_size) {
#else
if
(
size
+
t
->
size_current
>
t
->
size_limit
)
{
#endif
/* Try to remove one. */
PAIR
remove_me
;
for
(
remove_me
=
t
->
tail
;
remove_me
;
remove_me
=
remove_me
->
prev
)
{
...
...
@@ -263,6 +267,11 @@ static int maybe_flush_some (CACHETABLE t, long size) {
printf
(
"All are pinned
\n
"
);
return
1
;
}
#if 0
if (t->n_in_table > t->table_size)
printf("maybe %d %d - %ld %ld\n", t->n_in_table, t->table_size,
t->size_current, t->size_limit);
#endif
return
0
;
}
...
...
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