curator icon indicating copy to clipboard operation
curator copied to clipboard

[CURATOR-389] Factory and Default ThreadFactory inconsistencies and poor default thread names

Open jira-importer opened this issue 8 years ago • 4 comments

If you pass in a ThreadFactory to the CuratorFrameworkFactory that ThreadFactory is used for both the Framework and the ConnectionStateManager. If no ThreadFactory is passed in two thread factories are created so the threads are named based on what class is using the thread, for example:

"Curator-ConnectionStateManager-0" #62 daemon prio=5 os_prio=0 tid=0x00007f3d1272d800 nid=0x5466c waiting on condition [0x00007f3c46620000]
"Curator-Framework-0" #418 daemon prio=5 os_prio=0 tid=0x00007f3d12d29800 nid=0x54ece waiting on condition [0x00007f3ade6ef000]

If there is more than one curator there is no indication on what Zookeeper connections they are curating by looking at the thread dumps. Overall better default thread naming that uses information from the EnsembleProvider would help investigations.


Originally reported by mikepaw, imported from: Factory and Default ThreadFactory inconsistencies and poor default thread names
  • assignee: lvfangmin
  • status: Open
  • priority: Major
  • resolution: Unresolved
  • imported: 2025-01-21

jira-importer avatar Mar 01 '17 15:03 jira-importer

lvfangmin:

Currently, EnsembleProvider only contains connection string, and this is the only information in Curator that we can distinguish different Curator instance. Also using connection string cannot distinguish different instances which are using the same connection string. It would be nice if we allow the users to pass in the client id when initialize the CuratorFrameworkFactory. In the future, this information may also be used as the connection identity for auth or throttling.

What's your ideas, Jordan Zimmerman?

jira-importer avatar Mar 11 '17 23:03 jira-importer

mikepaw:

We currently have added the connect string to name and it works pretty well. We are using the FixedEnsembleProvider exclusively. Maybe for the Exhibitors listing one of them and then indicating how many more there are would be enough instead?

jira-importer avatar Mar 15 '17 13:03 jira-importer

lvfangmin:

Michael Pawliszyn thanks for your feedback, list one of them and the number sounds like a good idea, it doesn't solve the issue if multiple instance are running with the same connection string, but based on the fact that we suggest and people do usually use a single instance, it shouldn't be a problem.

jira-importer avatar Mar 16 '17 18:03 jira-importer

mikepaw:

It would still be interesting and valuable information to see more than 1 with the exact same string.

jira-importer avatar Mar 16 '17 18:03 jira-importer