Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
5ff29e4f
Commit
5ff29e4f
authored
13 years ago
by
Konstantin Shulgin
Browse files
Options
Downloads
Patches
Plain Diff
Test suite:
Valgrind tests was fixed.
parent
ece3f504
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
mod/box/box.m
+1
-0
1 addition, 0 deletions
mod/box/box.m
mod/box/memcached.h
+3
-0
3 additions, 0 deletions
mod/box/memcached.h
mod/box/memcached.m
+14
-5
14 additions, 5 deletions
mod/box/memcached.m
test/share/tarantool_box.sup
+11
-0
11 additions, 0 deletions
test/share/tarantool_box.sup
with
29 additions
and
5 deletions
mod/box/box.m
+
1
−
0
View file @
5ff29e4f
...
...
@@ -1428,6 +1428,7 @@ void
mod_free(void)
{
space_free();
memcached_free();
}
void
...
...
This diff is collapsed.
Click to expand it.
mod/box/memcached.h
+
3
−
0
View file @
5ff29e4f
...
...
@@ -33,6 +33,9 @@ struct tarantool_cfg;
void
memcached_init
();
void
memcached_free
();
void
memcached_space_init
();
...
...
This diff is collapsed.
Click to expand it.
mod/box/memcached.m
+
14
−
5
View file @
5ff29e4f
...
...
@@ -47,6 +47,7 @@ static int stat_base;
static
struct
fiber
*
memcached
_
expire
=
NULL
;
static
Index
*
memcached
_
index
;
static
struct
iterator
*
memcached
_
it
;
/*
memcached
tuple
format
:
<
key
,
meta
,
data
>
*/
...
...
@@ -418,6 +419,13 @@ memcached_init(void)
memcached
_
index
=
space
[
cfg
.
memcached
_
space
]
.
index
[
0
]
;
}
void
memcached
_
free
()
{
if
(
memcached
_
it
)
memcached
_
it
->
free
(
memcached
_
it
)
;
}
void
memcached
_
space
_
init
()
{
...
...
@@ -488,17 +496,17 @@ memcached_expire_loop(void *data __attribute__((unused)))
struct
box
_
tuple
*
tuple
=
NULL
;
say
_
info
(
"memcached expire fiber started"
)
;
struct
iterator
*
it
=
[
memcached
_
index
allocIterator
]
;
memcached
_
it
=
[
memcached
_
index
allocIterator
]
;
@
try
{
restart
:
if
(
tuple
==
NULL
)
[
memcached
_
index
initIterator
:
it
]
;
[
memcached
_
index
initIterator
:
memcached
_
it
]
;
struct
tbuf
*
keys
_
to
_
delete
=
tbuf
_
alloc
(
fiber
->
gc
_
pool
)
;
for
(
int
j
=
0
;
j
<
cfg
.
memcached
_
expire
_
per
_
loop
;
j
++
)
{
tuple
=
it
->
next
(
it
)
;
tuple
=
memcached
_
it
->
next
(
memcached
_
it
)
;
if
(
tuple
==
NULL
)
break
;
...
...
@@ -513,7 +521,8 @@ restart:
fiber
_
gc
()
;
goto
restart
;
}
@
finally
{
it
->
free
(
it
)
;
memcached
_
it
->
free
(
memcached
_
it
)
;
memcached
_
it
=
NULL
;
}
}
...
...
@@ -523,7 +532,7 @@ void memcached_start_expire()
return
;
assert
(
memcached
_
expire
==
NULL
)
;
memcached
_
expire
=
fiber
_
create
(
"mem
e
cached_expire"
,
-
1
,
memcached
_
expire
=
fiber
_
create
(
"memcached_expire"
,
-
1
,
-
1
,
memcached
_
expire
_
loop
,
NULL
)
;
if
(
memcached
_
expire
==
NULL
)
say
_
error
(
"can't start the expire fiber"
)
;
...
...
This diff is collapsed.
Click to expand it.
test/share/tarantool_box.sup
+
11
−
0
View file @
5ff29e4f
...
...
@@ -139,6 +139,17 @@
...
}
{
<box upadte command>
Memcheck:Leak
fun:salloc
fun:tuple_alloc
fun:prepare_update
fun:box_dispatch
fun:box_process*
...
}
##
## tarantool/lua suppressions
##
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment