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
66b24585
Commit
66b24585
authored
8 years ago
by
Georgy Kirichenko
Committed by
Roman Tsisyk
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use sleep/wakeup for snapshot daemon. Fixed #1420
parent
9f50ca5b
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/lua/snapshot_daemon.lua
+5
-5
5 additions, 5 deletions
src/box/lua/snapshot_daemon.lua
with
5 additions
and
5 deletions
src/box/lua/snapshot_daemon.lua
+
5
−
5
View file @
66b24585
...
...
@@ -172,29 +172,29 @@ do
if
interval
==
nil
then
break
end
if
self
.
control
:
get
(
interval
)
==
nil
then
fiber
.
sleep
(
interval
)
if
self
.
reloaded
~=
true
then
local
s
,
e
=
pcall
(
process
,
self
)
if
not
s
then
log
.
error
(
e
)
end
else
self
.
reloaded
=
false
log
.
info
(
"reloaded"
)
end
end
log
.
info
(
"stopped"
)
self
.
control
:
close
()
self
.
control
=
nil
self
.
fiber
=
nil
end
local
function
reload
(
self
)
if
self
.
snapshot_period
>
0
and
self
.
fiber
==
nil
then
self
.
control
=
fiber
.
channel
(
5
)
self
.
fiber
=
fiber
.
create
(
daemon_fiber
,
self
)
elseif
self
.
fiber
~=
nil
then
-- wake up daemon
self
.
control
:
put
(
true
)
self
.
reloaded
=
true
fiber
.
wakeup
(
self
.
fiber
)
end
end
...
...
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