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
61a661de
Commit
61a661de
authored
8 years ago
by
Vladimir Davydov
Browse files
Options
Downloads
Patches
Plain Diff
vinyl: drop vy_task->quota_release
As there is ->complete available now, we can release quota from there.
parent
79c2deb2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/box/vinyl.c
+3
-12
3 additions, 12 deletions
src/box/vinyl.c
with
3 additions
and
12 deletions
src/box/vinyl.c
+
3
−
12
View file @
61a661de
...
...
@@ -3374,7 +3374,7 @@ vy_dump_begin(struct vy_index *index, struct vy_range *range,
static
int
vy_dump_commit
(
struct
vy_index
*
index
,
struct
vy_range
*
range
,
struct
vy_mem
*
i
,
int64_t
*
p_quota_release
,
struct
vy_run
*
run
)
struct
vy_mem
*
i
,
struct
vy_run
*
run
)
{
/* commit */
run
->
next
=
range
->
run
;
...
...
@@ -3384,7 +3384,7 @@ vy_dump_commit(struct vy_index *index, struct vy_range *range,
index
->
range_index_version
++
;
assert
(
range
->
used
>=
i
->
used
);
range
->
used
-=
i
->
used
;
*
p
_quota_release
=
i
->
used
;
vy
_quota_release
(
index
->
env
->
quota
,
i
->
used
)
;
index
->
size
+=
vy_run_index_size
(
&
run
->
index
)
+
vy_run_index_total
(
&
run
->
index
);
struct
vy_mem
swap
=
*
i
;
...
...
@@ -4415,10 +4415,6 @@ struct vy_task {
* View sequence number at the time when the task was scheduled.
*/
int64_t
vlsn
;
/*
* Release used quota after finishing task.
*/
int64_t
quota_release
;
/*
* Result of vy_range_compact_begin() is stored here.
*/
...
...
@@ -4445,7 +4441,6 @@ vy_task_new(struct mempool *pool, struct vy_index *index,
}
task
->
ops
=
ops
;
task
->
index
=
index
;
task
->
quota_release
=
0
;
rlist_create
(
&
task
->
compact_result
);
vy_index_ref
(
index
);
return
task
;
...
...
@@ -4455,10 +4450,6 @@ static inline void
vy_task_delete
(
struct
mempool
*
pool
,
struct
vy_task
*
task
)
{
if
(
task
->
index
)
{
if
(
task
->
quota_release
!=
0
)
{
struct
vy_quota
*
quota
=
task
->
index
->
env
->
quota
;
vy_quota_release
(
quota
,
task
->
quota_release
);
}
vy_index_unref
(
task
->
index
);
task
->
index
=
NULL
;
}
...
...
@@ -4478,7 +4469,7 @@ static int
vy_task_dump_complete
(
struct
vy_task
*
task
)
{
return
vy_dump_commit
(
task
->
index
,
task
->
range
,
task
->
range_mem
,
&
task
->
quota_release
,
task
->
dump_result
);
task
->
dump_result
);
}
static
struct
vy_task_ops
vy_task_dump_ops
=
{
...
...
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