Похожие чаты

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 ответов

27 просмотров

Goroutine synchronization issue?

Gaurav-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“

Gaurav-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

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

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

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта