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

SimpleDateFormat is not thread safe #62

Closed
xuwei-k opened this issue Oct 14, 2016 · 3 comments · Fixed by #64
Closed

SimpleDateFormat is not thread safe #62

xuwei-k opened this issue Oct 14, 2016 · 3 comments · Fixed by #64
Labels
type/bug The PR fixed a bug or issue reported a bug
Milestone

Comments

@merlimat merlimat added this to the 1.15 milestone Oct 14, 2016
@merlimat merlimat added the type/bug The PR fixed a bug or issue reported a bug label Oct 14, 2016
@merlimat
Copy link
Contributor

Thank you for pointing this out. For some reason it seemed obvious that SimpleDateFormat should be thread-safe, but the javadoc it's pretty clear in that is not true.

I think we should just wrap all these instances with a FastThreadLocal class.

maskit pushed a commit to maskit/pulsar that referenced this issue Oct 14, 2016
@maskit
Copy link
Member

maskit commented Oct 14, 2016

Oops, I haven't read @merlimat 's comment. I just sent a PR to replace the formatters with DateTimeFormatter.

@merlimat
Copy link
Contributor

@maskit actually DateTimeFormatter looks like a much better option (I didn't know about that class), since thread locals have some overhead

sboobna pushed a commit that referenced this issue Oct 14, 2016
* Use thread safe datetime formatter

This closes #62

* Organize import lines
sijie pushed a commit to sijie/pulsar that referenced this issue Mar 4, 2018
1. upload packages to bookkeeper will include a UUID
2. incorrect setName - > setNamespace
hrsakai pushed a commit to hrsakai/pulsar that referenced this issue Dec 10, 2020
enable to specify the sequenceID
dlg99 pushed a commit to dlg99/pulsar that referenced this issue Apr 6, 2022
* Fix Kinesis integration test

* Close Kinesis client at the end of the integration test

* Add integration test for Kinesis sink with schema and JSON output
nicoloboschi referenced this issue in nicoloboschi/pulsar Apr 12, 2022
* Fix Kinesis integration test

* Close Kinesis client at the end of the integration test

* Add integration test for Kinesis sink with schema and JSON output

(cherry picked from commit 652ea0f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants