Похожие чаты

Hello! I’m writing thousands of KV pairs in BadgerDB. I’m

using batch writes for this. And I’m maintaining 32 goroutines that write them.

At the end I’m calling Batch flush and DB sync. Also sync writes is turned on.

But I’ve noticed that not all writes are syncing to disk at the end.

Sometimes at the end, after program is done running I see a discrepancy between total and saved objects.

Also, this discrepancy is kinda random. Sometimes errata is ~800 sometimes ~700 and sometimes 0

I’m really confused here. What else can I do? Please advise

4 ответов

8 просмотров

Goroutine synchronization issue?

udon-Gogia Автор вопроса
Roman Sharkov
Goroutine synchronization issue?

Nope, had it before but it’s solved now. All goroutines in sync. Program ends with no errors gracefully. This part I’ve verified. Had this issue earlier.

Okay, funny idea. But can it be that you still have some writes open and you flush/gc in the meantime? So every ongoing write will be "deleted“

udon-Gogia Автор вопроса
Mark X
Okay, funny idea. But can it be that you still hav...

I don’t think flush would delete. It is meant to write all in memory batched transactions to disk. Sync does the same. I got this from their docs. But, I’ll remove my manual flush / sync calls and check again if something changes

Похожие вопросы

Обсуждают сегодня

Здравствуйте! Есть вопросы по ПК: 1.1. Безопасно ли запускать программы, которым я не доверяю, в виртуальной машине под KVM+qemu? (x86_64) 1.2. То же самое при использовании ...
Pavel
5
Hi everyone! I have a two-folded message to share today. First: updates and news, as we are being asked for those. We still want to go like we did the last 6 years: we w...
Marten | Unibright.io
31
Я тут пытаюсь переработать архитектуру подсистемы памяти ядра во что-то осмысленное. Есть pmm, который создает набор range’ей(пока что только для ядра, потом для юзерспейса), ...
Evg Resh
9
Комрады, хотел уточнить. Проперть в OnDestroy юнита-хозяина по-прежнему доступна? И еще уточнение: finalization юнита наступает раньше или позже OnDestroy?
Ed Doc
21
У меня вопрос, а какой уровень оптимизации ставить при сборке на i5 4 ядра 16G ddr3 ОЗУ и видюха Geforce GTX 970?
Sir Jiga
18
Guys, what’s the most expensive part of your budget for your business/startup/app/website?
Ice Kream
18
Скажите, можно ли как-то "переместить" динамический массив из одной переменной в другую? Скажем, переместить из TList<> в TArray<>. Именно переместить, а не скопировать. Если ...
Eugene Krasnikov (ᴊɪɴ x)
37
Oh.... Admins at the main TG is already muted me. How many months Sir you muted me? Or forever if you are here @Janevietani @JohnnySonic
Charles Dar
28
Happy Friday and happy CartesiWeekly! This week on the list: 🪲 Bug Buster Update 🎥 Erick de Moura’s interview with Ornella from Web3TV 👽 Thriving Cartesi alien 🇧🇷 SBRC hackat...
Nida | Cartesi - Never DM first or ask for funds!
1
комрады, че-та лыжы не едут var tmpFont: TFont; begin tmpFont:= TFont.Create; try case rgFontColor.ItemIndex of 0: tmpFont.Color:= clWindowText; 1: tmpFo...
Ed Doc
34
Карта сайта