Fork me on GitHub
#datalevin
<
2022-06-21
>
Benjamin08:06:10

Hi what does this error mean?

Fail to transact to LMDB: \"key/data pair already exists (-30799)\

Benjamin08:06:13

I have an attribute that should be an edn blob. I determined that with a certain key it throws.

Huahai23:06:03

usually a concurrent transact problem

Benjamin14:06:12

yea if that fits the observation that I wasn't able to transact from the repl anymore. Can be that I concurrently transacted

Benjamin13:06:02

is there a limit to how many cardinality "many" I can assert at once?

Benjamin13:06:07

Error indexing document:"Index -1 out of bounds for length 0"
   {:doc-ref #datalevin/Datom [554 :phone/models ""], :doc-text ""}
                search.clj:  338  datalevin.search.SearchEngine/add_doc
              storage.cljc:  350  datalevin.storage.Store/load_datoms
                   db.cljc: 1008  datalevin.db$local_transact_tx_data/invokeStatic
                   db.cljc:  785  datalevin.db$local_transact_tx_data/invoke
                   db.cljc: 1040  datalevin.db$transact_tx_data/invokeStatic
                   db.cljc: 1022  datalevin.db$transact_tx_data/invoke
                 core.cljc:  276  datalevin.core$with/invokeStatic
                 core.cljc:  271  datalevin.core$with/invoke
                 core.cljc:  273  datalevin.core$with/invokeStatic
                 core.cljc:  271  datalevin.core$with/invoke
                 core.cljc:  288  datalevin.core$db_with/invokeStatic
                 core.cljc:  284  datalevin.core$db_with/invoke
I have this error when I say db-with

Benjamin14:06:44

ah it was somehow caused by a blank string in one of my "many" attribute values. For some reason I was able to put it in the database though.

Huahai15:06:02

no limit. this error comes from search indexing. You are indexing empty string, probably the search engine doesn’t like that.

Huahai15:06:37

I don’t think i wrote a test for indexing empty string.

Benjamin16:06:17

yea it would be nice if it throws earlier

Benjamin16:06:50

although I hear Rich saying "this is a database for consenting adults"

Huahai16:06:31

it will be fixed in the next release, we will just ignore empty string

✔️ 1
Huahai23:06:31

fix in 0.6.15

🎉 1