[
https://issues.apache.org/jira/browse/UNOMI-1006?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Serge Huber updated UNOMI-1006:
-------------------------------
Description:
h3. Summary
The new cluster scheduler uses a node id to know which node holds a task. By
default every node uses the same id, "test-scheduler-node", and no environment
variable lets you change it. Unlike the cluster node id, it must be changed by
editing a configuration file.
Two nodes that keep the default both think they own the same task, so a task
that should run once can run on both.
The goal of this ticket is that each node has its own scheduler id without
extra work.
h3. Ways to explore
* Add an environment variable for the scheduler node id, as already exists for
the cluster node id.
* Default it to the cluster node id, or to a generated unique value.
* Warn or refuse to start when two nodes use the same id.
* Keep the lock owner check strict.
h3. How to test
Manual check: start two nodes with default settings. Check that they have
different scheduler ids and that an exclusive task runs on only one node.
Automated tests to add. Each must fail on the 4.0.0 release candidate and pass
once the fix is in:
* A unit test that two scheduler instances started with the default settings
get different node ids, and that the environment variable is used when it is
set.
* A lock test: a lock held by one node cannot be taken by another node while it
is valid.
* A test that two nodes using the same id are detected (warning or refusal, as
decided).
* A cluster race test with two schedulers on default settings: an exclusive
task runs exactly once per period.
was:
h3. Summary
The new cluster scheduler uses a node id to know which node holds a task. By
default every node uses the same id, "test-scheduler-node", and no environment
variable lets you change it. Unlike the cluster node id, it must be changed by
editing a configuration file.
Two nodes that keep the default both think they own the same task, so a task
that should run once can run on both.
The goal of this ticket is that each node has its own scheduler id without
extra work.
h3. Ways to explore
* Add an environment variable for the scheduler node id, as already exists for
the cluster node id.
* Default it to the cluster node id, or to a generated unique value.
* Warn or refuse to start when two nodes use the same id.
* Keep the lock owner check strict.
h3. How to test
Start two nodes with default settings. Check that they have different scheduler
ids and that an exclusive task runs on only one node.
> All Unomi nodes share the same scheduler node id by default
> -----------------------------------------------------------
>
> Key: UNOMI-1006
> URL: https://issues.apache.org/jira/browse/UNOMI-1006
> Project: Apache Unomi
> Issue Type: Bug
> Affects Versions: unomi-4.0.0
> Reporter: Serge Huber
> Priority: Critical
> Fix For: unomi-4.0.0
>
>
> h3. Summary
> The new cluster scheduler uses a node id to know which node holds a task. By
> default every node uses the same id, "test-scheduler-node", and no
> environment variable lets you change it. Unlike the cluster node id, it must
> be changed by editing a configuration file.
> Two nodes that keep the default both think they own the same task, so a task
> that should run once can run on both.
> The goal of this ticket is that each node has its own scheduler id without
> extra work.
> h3. Ways to explore
> * Add an environment variable for the scheduler node id, as already exists
> for the cluster node id.
> * Default it to the cluster node id, or to a generated unique value.
> * Warn or refuse to start when two nodes use the same id.
> * Keep the lock owner check strict.
> h3. How to test
> Manual check: start two nodes with default settings. Check that they have
> different scheduler ids and that an exclusive task runs on only one node.
> Automated tests to add. Each must fail on the 4.0.0 release candidate and
> pass once the fix is in:
> * A unit test that two scheduler instances started with the default settings
> get different node ids, and that the environment variable is used when it is
> set.
> * A lock test: a lock held by one node cannot be taken by another node while
> it is valid.
> * A test that two nodes using the same id are detected (warning or refusal,
> as decided).
> * A cluster race test with two schedulers on default settings: an exclusive
> task runs exactly once per period.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)