Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating 2 FiberScheduler with MonitorType.METRICS cause "A metric named runawayFibers already exists" #330

Open
bckfnn opened this issue Sep 18, 2019 · 0 comments

Comments

@bckfnn
Copy link

bckfnn commented Sep 18, 2019

with code like:

    public static void main(String[] args) {
	    FiberScheduler s1 = new FiberForkJoinScheduler("s1", 4, MonitorType.METRICS, true);
	    FiberScheduler s2 = new FiberForkJoinScheduler("s2", 4, MonitorType.METRICS, true);
    }

I get an exception

Exception in thread "main" java.lang.IllegalArgumentException: A metric named runawayFibers already exists
	at com.codahale.metrics.MetricRegistry.register(MetricRegistry.java:91)
	at co.paralleluniverse.common.monitoring.Metrics.register(Metrics.java:42)
	at co.paralleluniverse.fibers.MetricsFibersMonitor.<init>(MetricsFibersMonitor.java:56)
	at co.paralleluniverse.fibers.FiberScheduler.createFibersMonitor(FiberScheduler.java:50)
	at co.paralleluniverse.fibers.FiberScheduler.<init>(FiberScheduler.java:40)
	at co.paralleluniverse.fibers.FiberForkJoinScheduler.<init>(FiberForkJoinScheduler.java:59)
	at co.paralleluniverse.fibers.FiberForkJoinScheduler.<init>(FiberForkJoinScheduler.java:73)
	at test.FiberTest.main(FiberTest.java:12)

It looks like the runawayFibers metrics is not prefixed with the name of the scheduler like the rest of the metrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant