Skip to content
This repository has been archived by the owner on Aug 15, 2020. It is now read-only.

Add locking mechanism #82

Closed
George3d6 opened this issue Jun 8, 2020 · 0 comments
Closed

Add locking mechanism #82

George3d6 opened this issue Jun 8, 2020 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@George3d6
Copy link
Contributor

Not a priority until we roll out the new minsdb server AND have the test suite in place

We'll need a locking mechanism when accessing the datasource through the DataStore and mindsdb through the upcoming mindsdb interface.

This will need to support locking between processes and ideally it can also be implemented in mindsdb native such that users can use all the APIs in paralle.

At the moment the way mindsdb_server operates with datasources is not, in theory, "concurrency safe" but (especially provided it's run on a linux machine) this should never be an issue in practice.

I don't expect this to b here either BUT at some point we might encounter it and it's better to prepare for these things in advance.

A good candidate for this is Ilock:

https://github.com/symonsoft/ilock

Which seems to be a very well implemented OS-neutral file-system based lock. I've read through the code and tbh I'm not sure the implementation would work out perfectly on all OS-es (i.e. I can see weird edge cases) but it seems to be more than good enough.

@George3d6 George3d6 added bug Something isn't working enhancement New feature or request labels Jun 8, 2020
@George3d6 George3d6 added this to the Clickhouse Support milestone Jun 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant