-
Notifications
You must be signed in to change notification settings - Fork 94
ETL load does not support 0 value keys #766
Comments
It's maybe-big task. Next things needs to be done:
|
Hm, I will take one step at a time. and update this post as I investigate
it seems https://github.com/torquem-ch/mdbx-go/blob/master/mdbx/txn.go#L548 does not support empty values. replaces 0 length with a []byte{0}, then passes to Put. it seems in MDBX -
seems it passes through https://github.com/ledgerwatch/erigon-lib/blob/main/kv/mdbx/kv_mdbx.go#L1109, https://github.com/ledgerwatch/erigon-lib/blob/main/kv/mdbx/kv_mdbx.go#L1374 all the way down, so it does support empty values as for empty keys, seems it is properly handling it, at least here: https://github.com/ledgerwatch/erigon-lib/blob/main/kv/mdbx/kv_mdbx.go#L535. tests will need to be written TODO:
|
FYI: you can ignore |
first time using etl just now- I was scratching my head over why Load was not working, it was because i was trying to load empty values, possible with direct transaction, but seems currently seems in ETL framework it is used as the delete identifier.
https://github.com/ledgerwatch/erigon-lib/blob/main/etl/collector.go#L239
One possible solution - add TransformArg "AllowEmptyValues" to skip this check, and allow therefore "zero values"? this is something supported by MDBX. Happy to make a PR if it seems like a good idea.
example use case, filling a database with a large amount of random empty keys for performance benchmark:
The text was updated successfully, but these errors were encountered: