Skip to content

DataTypeConverter usage has potential thread-safety issues #2728

@janeklb

Description

@janeklb

Description

This is not an explicit bug report in the sense that I haven't experienced a problem (yet?), it is just something I bumped into while browsing the code.

DataTypeConverter has a javadoc comment stating that it is not thread safe. For what it's worth, I have also confirmed thread safety problems because I ended up using the DataTypeConverter.INSTANCE in production (before I realised that it was labelled as non thread safe) which caused some bugs.

After fixing the bugs in my project, I was curious about the fact that a static singleton DataTypeConverter.INSTANCE was even declared in the clickhouse-java repo (why have a singleton instance if it is not thread safe, in an otherwise thread safe library?). Of course this class is in a package named internal, so it's not really my business... :) Still, I did notice that DataTypeConverter.INSTANCE is used in two places which makes me wonder if it could be the source of (other / future / not-yet-encountered) problems..

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions