Closed fenchu closed 1 month ago
I think tinydb
is not designed to handle multiple request at the same time. It's clearly stated in the documentation itself.
Hey @fenchu, as @A91y has pointed out, TinyDB is not designed for concurrent/multithreaded usage. Futhermore, there is no mechanism for specifying uniqueness constraints in TinyDB and it is a feature TinyDB wasn't really designed for. So, simply said, it seems to me that TinyDB doesn't work out for your use case. Maybe you could investiagte using Sqlite as it is a more fully-featured database system.
Since the tinydb is an array of loglines, how can I ensure uniquness on those loglines,
Currently each logline is an hash with my unique id, so I need to add it to a hash and then save it back again. this takes time. Especially when the structure grow.
Would be nice if we could set like max1000 lines and use my id as the identifier.
I do not have this problem when app runs singlethreaded. But has become a pain not lots of people using it.