apache / tsfile

Apache TsFile
https://tsfile.apache.org/
Apache License 2.0
104 stars 50 forks source link

Concurrent access to a TsFile #218

Closed cbiale closed 2 months ago

cbiale commented 2 months ago

Is concurrent access to a TsFile possible using the API directly or should such accesses be handled using locks?

github-actions[bot] commented 2 months ago

Hi, this is your first issue in the Apache TsFile project. Thanks for your report. Welcome to join the community!

jt2594838 commented 2 months ago

The answer is basically no. Concerning performance, we would like not to add concurrent control in TsFile, which does not seem quite meaningful in typical scenarios. There is one exception: you may open several readers on the same CLOSED TsFile and perform concurrent queries.

jt2594838 commented 2 months ago

Also, you may open several writers to write DIFFERENT TsFiles, but I guess it does not concern concurrent control. For one thing, the TsFileConfig is a static object shared within a process. Any attempt to modify it during runtime should be aware of it.