spectra-cluster / spectra-cluster-2

A complete re-write of the spectra-cluster codebase
1 stars 2 forks source link

Find solution for temporary storage #92

Closed jgriss closed 4 years ago

jgriss commented 4 years ago

Temporary storage does currently not work as intended.

If you create a temporary dynamic storage and load clusters into it, then pass this object on to another function to read the clusters again an Exception is thrown.

Reason: The index file is only written on close. In the temporary implementation this deletes the database and it can no longer be used for reading.

Solution 1: We have to investigate, if calling flush on the writer is sufficient to be in-sync with the readers. But this approach always has the danger that parallel read / writes may be out of sync.

Solution 2: Abandon temporary dynamic storage. Potentially, add a delete function to the class.

To definitely "solve" this issue we could split the implementations in only readers and only writers. Or at least mention this in the documentation of the implementation.

jgriss commented 4 years ago

Solved in #93