This repository has been archived by the owner on Jul 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MarinPostma
force-pushed
the
actor-index-controller
branch
from
March 1, 2021 14:44
7206bbb
to
3fdb21d
Compare
MarinPostma
force-pushed
the
actor-index-controller
branch
from
March 1, 2021 14:45
3fdb21d
to
c4dfd5f
Compare
MarinPostma
force-pushed
the
actor-index-controller
branch
from
March 3, 2021 10:02
12b5afe
to
9aca6fa
Compare
create two channels for Index handler, one for writes and one for reads, so write are processed one at a time, while reads are processed in parallel.
MarinPostma
force-pushed
the
actor-index-controller
branch
from
March 12, 2021 16:48
49af0fc
to
49b74b5
Compare
This was referenced Mar 15, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Experimental rewrite of the index controller using the actor concurency model.
The advantages are:
Ultimately, the goal is to get of the IndexController trait, since the looser coupling of components should allow the integration of the DS without too much trouble.
This is dependant of tokio 1.0 for the moment, which involves a Beta version of Actix, and a patch on actix-cors, but nothing that won't get stabilized soon enough.
Index Deletion
Index deletion not atomic. First the reference to the index is removed from the index uuid resolver actor, then, the index with the corresponding
uuid
is removed from theupdate_store
and theindex_store
, and the files are a wiped from the filesystem. The later may fail and the index may not be removed from the db and the filesystem, even though the deletion is reported as succeeded, but they will not be accessible anymore since reference to them will have been removed from theuuid_resolver
actor.This scenario is unlikely which is why I haven't implemented a fail guard for it, but if it occurs in the future, or if we decide to implement it any way, we could, for example, occasionally check for the existing indexes by querying the
uuid_resolver
, and clean any outstanding index, in the same way a garbage collector would do.close #68
close #69
close #65