Data loss and writing data slowly and frequent timeout after auto failover


#21

see this other topic where I tried to provide a base rewrite of the code with the RetryBuilder: The problem of bulk get
I’ll edit it to make the insert cold :cold_sweat:


#22

you need to static import the RetryBuilder.anyOf method (or prefix it with the class). Also note that there should be a .build() after delay(...).


#23

Thank you very much.
I have succeeded.


#24

but the data loss have existed.


#25

so you are calling 1000 times your add method, and it returns true every time? what is the calling code like? what are the keys like? are they generated?

do you see the count difference even before rebalancing (eg by looking in the web console see how many documents are listed)?

Note that I’ve changed the code sample referred above, to make the insert inside a flatMap.


#26

quote from @xiger

Yes, 1000 return true , before reblance it is 999 , and after rebalance, it still is 999.
but it is rare.

The situation:
while loading 1000 items,
I kill one of four nodes, and auto-failover ends, but i donnot reblance, and let it do so, and at the same time i notice that the item count is right early, and i find the item count wrong in the end, but the record count printed in logs is right .


#27

Hi,
I have come, and can you give me some ideas?