Skip to content
This repository was archived by the owner on Feb 8, 2019. It is now read-only.

fix GEARPUMP-41 check akka.scheduler.tick-duration on Windows#4

Merged
asfgit merged 1 commit into
apache:masterfrom
huafengw:fix_GEARPUMP-41
Apr 28, 2016
Merged

fix GEARPUMP-41 check akka.scheduler.tick-duration on Windows#4
asfgit merged 1 commit into
apache:masterfrom
huafengw:fix_GEARPUMP-41

Conversation

@huafengw
Copy link
Copy Markdown
Contributor

No description provided.

@whjiang
Copy link
Copy Markdown
Contributor

whjiang commented Apr 27, 2016

+1

// Minimum supported akka.scheduler.tick-duration on Windows is 10ms
val duration = config.getInt(Constants.AKKA_SCHEDULER_TICK_DURATION)
val updatedConf = if (akka.util.Helpers.isWindows && duration < 10) {
LOG.warn(s"akka.scheduler.tick-duration on Windows must be larger than 10ms, set to 10ms")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better use Constants.AKKA_SCHEDULER_TICK_DURATION in the LOG.

@manuzhang
Copy link
Copy Markdown
Member

if (!akka.util.Helpers.isWindows) {

// Change the akka.scheduler.tick-duration to 10ms for Linux or Mac
// Change the akka.scheduler.tick-duration to 1 ms for Linux or Mac
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to load window specific or linux specific configurations here than later to decide whether a config belongs to windows or linux

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's different situations.
When the cluster config is loaded, it will check the environment and akka.scheduler.tick-duration to make sure the ActorSystem can be launched correctly.

However, when launching an application, the Config of Executor's ActorSytem is composed of Worker's cluster config and application's config, and Worker's akka.scheduler.tick-duration could be overwrote by a wrong value. So another check here is needed.

@manuzhang
Copy link
Copy Markdown
Member

+1

@asfgit asfgit merged commit ccf318f into apache:master Apr 28, 2016
@huafengw huafengw deleted the fix_GEARPUMP-41 branch April 28, 2016 02:40
manuzhang pushed a commit to manuzhang/incubator-gearpump that referenced this pull request Jan 24, 2017
Author: Kam Kasravi <kamkasravi@yahoo.com>

Closes apache#4 from kkasravi/GEARPUMP-187.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants