-
Notifications
You must be signed in to change notification settings - Fork 14
Offer cartridge role #107
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
We had a pull request before. It's a simple role for tests: The role is not an independent unit. It just saves the states of expirationd's tasks. Tasks must be started from the client code manually. So I propose an another approach:
expirationd:
first_role_name:
space_id: "space_id"
is_expired: "is_expired_func"
options:
args: "arg"
force: true
full_scan_delay: 1
etc
resume: true
second_role_name:
space_id: "space_id_second"
is_expired: "is_expired_func_second"
options:
args: "arg"
force: true
full_scan_delay: 1
etc
resume: false We can load functions by name from local function load_function(func_name)
if func_name == nil or type(func_name) ~= 'string' then
return nil
end
local func = rawget(_G, func_name)
if func == nil or type(func) ~= 'function' then
return nil
end
return func
end The role function local function stop()
for _, task in tasks_list do
log.info('stop expirationd task: %s', task)
expirationd.kill(task)
end
tasks_list = {}
return true
end
local function apply_config(conf, opts) -- luacheck: no unused args
local conf = conf[role_name] or {}
stop()
if opts.is_master then
start(conf)
end
return true
end I have two questions:
But I propose to start with a simple implementation. And add additional parameters/functions later. |
|
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
The patch adds a Tarantool Cartridge role with features: * expirationd as a Tarantool Cartridge service for easy access to all API calls. * The role stops all expirationd tasks on an instance on the role termination. * It can automatically start and kill old tasks from the role congiguration. Closes #107
Overview This release adds a Tarantool Cartridge role for expirationd package and improves the default behavior. Breaking changes None. New features Continue a task from a last tuple (#54). Decrease tarantool-checks dependency from 3.1 to 2.1 (#124). Process a task on a writable space by default (#42). Wait until a space or an index is created (#68, #116). Tarantool Cartridge role (#107). Bugfixes Fix build and installation of rpm/deb packages (#124). Do not restart work fiber if index does not exist (#64). Update changelogs for rpm/deb packages. Testing Shuffle tests (#118). Fix test_mvcc_vinyl_tx_conflict (#104, #105). Fix flaky 'simple expires test' (#90). Other Add GitHub Actions workflow with debug Tarantool build (#102). Add GitHub Actions workflow for deploying module packages to S3 based repositories (#43).
Overview This release adds a Tarantool Cartridge role for expirationd package and improves the default behavior. Breaking changes None. New features Continue a task from a last tuple (#54). Decrease tarantool-checks dependency from 3.1 to 2.1 (#124). Process a task on a writable space by default (#42). Wait until a space or an index is created (#68, #116). Tarantool Cartridge role (#107). Bugfixes Fix build and installation of rpm/deb packages (#124). Do not restart a work fiber if an index does not exist (#64). Update changelogs for rpm/deb packages. Testing Shuffle tests (#118). Fix test_mvcc_vinyl_tx_conflict (#104, #105). Fix flaky 'simple expires test' (#90). Other Add GitHub Actions workflow with debug Tarantool build (#102). Add GitHub Actions workflow for deploying module packages to S3 based repositories (#43).
Overview This release adds a Tarantool Cartridge role for expirationd package and improves the default behavior. Breaking changes None. Deprecated Obsolete functions: task_stats, kill_task, get_task, get_tasks, run_task, show_task_list. New features Continue a task from a last tuple (#54). Decrease tarantool-checks dependency from 3.1 to 2.1 (#124). Process a task on a writable space by default (#42). Wait until a space or an index is created (#68, #116). Tarantool Cartridge role (#107). Bugfixes Fix build and installation of rpm/deb packages (#124). Do not restart a work fiber if an index does not exist (#64). Update changelogs for rpm/deb packages. Testing Shuffle tests (#118). Fix test_mvcc_vinyl_tx_conflict (#104, #105). Fix flaky 'simple expires test' (#90). Other Add GitHub Actions workflow with debug Tarantool build (#102). Add GitHub Actions workflow for deploying module packages to S3 based repositories (#43).
Overview This release adds a Tarantool Cartridge role for expirationd package and improves the default behavior. Breaking changes None. Deprecated Obsolete functions: task_stats, kill_task, get_task, get_tasks, run_task, show_task_list. New features Continue a task from a last tuple (#54). Decrease tarantool-checks dependency from 3.1 to 2.1 (#124). Process a task on a writable space by default (#42). Wait until a space or an index is created (#68, #116). Tarantool Cartridge role (#107). Bugfixes Fix build and installation of rpm/deb packages (#124). Do not restart a work fiber if an index does not exist (#64). Update changelogs for rpm/deb packages. Testing Shuffle tests (#118). Fix test_mvcc_vinyl_tx_conflict (#104, #105). Fix flaky 'simple expires test' (#90). Other expirationd.start() parameter `space_id` has been renamed to `space` (#112). Add GitHub Actions workflow with debug Tarantool build (#102). Add GitHub Actions workflow for deploying module packages to S3 based repositories (#43).
Overview This release adds a Tarantool Cartridge role for expirationd package and improves the default behavior. Breaking changes None. Deprecated Obsolete functions: task_stats, kill_task, get_task, get_tasks, run_task, show_task_list. New features Continue a task from a last tuple (#54). Decrease tarantool-checks dependency from 3.1 to 2.1 (#124). Process a task on a writable space by default (#42). Wait until a space or an index is created (#68, #116). Tarantool Cartridge role (#107). Bugfixes Fix build and installation of rpm/deb packages (#124). Do not restart a work fiber if an index does not exist (#64). Update changelogs for rpm/deb packages. Testing Shuffle tests (#118). Fix test_mvcc_vinyl_tx_conflict (#104, #105). Fix flaky 'simple expires test' (#90). Other expirationd.start() parameter `space_id` has been renamed to `space` (#112). Add GitHub Actions workflow with debug Tarantool build (#102). Add GitHub Actions workflow for deploying module packages to S3 based repositories (#43).
It'll easy setup periodical expiration in a cartridge application.
The text was updated successfully, but these errors were encountered: