Closed michail-vestnik closed 1 year ago
it's not a problem in general, most of databases don't remove old values physically from file (Sniper does this)
https://github.com/recoilme/pudge/blob/master/api.go#L514 backup must clean from unused space, for example
Thank you for your time! I like sniper, it's similar to https://github.com/VictoriaMetrics/fastcache. But I took the pudge engine, heavily modified it, added cuckoo filter, etc.. So it's a shame to lose the work I've done.
Why it's critical? Many overrides, huge db size? Maybe just a repack db from time to time as we do with postgres and other db's?
I think this is critical for metrics and statistics. For example, the number of views and visits. Do I understand correctly that deleting is a very expensive operation because you have to overwrite the file every time? Is the byte overwrite operation expensive?
For example you override key sophia with ekaterina. You have file: [...Sophia... 10Mb of data] - and try to replace Sophia with Ekaterina, but no room for Ekaterina and you must rewrite all 10Mb
In case of metrics we must use 8byte room for any int and override just in place (find address/get value/increment/override) - but it need some specific method for this case, something like IncrInt. You may fork and implement it
Thanks for your time! you helped me
На русском
Пожалуйста помогите решить проблему. Я прочитал что ваш интерес к проекту пропал и всё внимание уделяется sniper. Но мы встроили pudge в проект, где он идеально вписывается и поздняк метаться. Но pudge не перезаписывает значения. Прилагаю скриншот. Слева код а справа база данных.
On english
Please help solve the problem. I read that your interest in the project has disappeared and all attention is paid to sniper. But we built pudge into the project where it fits perfectly. But pudge doesn't overwrite the values. Here's a screenshot. On the left is the code and on the right is the database.