Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

actor index controller #58

Merged
merged 70 commits into from
Mar 15, 2021
Merged

actor index controller #58

merged 70 commits into from
Mar 15, 2021

Conversation

MarinPostma
Copy link
Contributor

@MarinPostma MarinPostma commented Feb 26, 2021

Experimental rewrite of the index controller using the actor concurency model.

The advantages are:

  • Fully asynchronous
  • Decoupling of the modules
  • Common semantic for the different modules and their interactions
  • Simpler codebase

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 the update_store and the index_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 the uuid_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

@MarinPostma MarinPostma marked this pull request as draft February 26, 2021 16:18
@MarinPostma MarinPostma force-pushed the actor-index-controller branch from 7206bbb to 3fdb21d Compare March 1, 2021 14:44
@MarinPostma MarinPostma force-pushed the actor-index-controller branch from 3fdb21d to c4dfd5f Compare March 1, 2021 14:45
@MarinPostma MarinPostma force-pushed the actor-index-controller branch from 12b5afe to 9aca6fa Compare March 3, 2021 10:02
@MarinPostma MarinPostma force-pushed the actor-index-controller branch from 49af0fc to 49b74b5 Compare March 12, 2021 16:48
@MarinPostma MarinPostma marked this pull request as ready for review March 15, 2021 13:28
@MarinPostma MarinPostma merged commit 0c17b16 into main Mar 15, 2021
@MarinPostma MarinPostma deleted the actor-index-controller branch March 15, 2021 17:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant