Graph.build
with an empty Backend will rebuild and overwrite data
#355
Labels
bug
Something isn't working
Describe the bug
Graph.build()
with existing outputs not tracked in the Backend (eg: run build, then wipe db) will happily overwrite data because it thinks it doesn't exist. We should check for this and error during build.This doesn't happen with the
MemoryBackend
because that callsstorage.discover_partitions(...)
if there is no hit in the db (since it's not actually persistent).Does this negate the perf benefits of the db? Probably not for most sync style operations, but may lead to rate limits issues depending on how it is implemented.
To Reproduce
Update
docs/examples/spend/demo.py
to use a persistent backend, run it once, wipe the backend, and run again. Notice that the subsequent run did not skip.Expected behavior
The second run to error saying something about "Unexpectedly found data at ..." and how to remedy (either delete data or some way to import into the db).
The text was updated successfully, but these errors were encountered: