Is refresh interval call is sync or async call in elasticsearch


(Krishna Raj) #1

hello sir,
I'm new to elastic search I needed to know how the refresh interval works internally.
lets say resfresh interval is 1 second so after 10 seconds how many refresh call will happen if each refresh completes 5 seconds to update file system
from memory buffer.

will it take 2 refresh call or 10 refresh call.


(Mark Walkom) #2

It's sync, so it'll only run one if there isn't one running.

But if it takes 5 seconds to do something on the filesystem you have bigger problems.


(jakesjohn) #3

When I am using monitoring plugin, I am seeing a graph with index refresh times. I see that graph values are fluctuating and it is not same as the configured refresh interval. Are they same?


(Mark Walkom) #4

Please start your own thread :slight_smile:


(Krishna Raj) #5

thank you sir


(Krishna Raj) #6

Hello Sir,
As you told refresh is sync if the refresh is called continuously from coding using updatewith refresh and each refresh takes 100ms to refresh the particular shard what will happen to the refresh called using refresh interval will it trigger or wait for the refresh to complete.

if refresh of refresh interval waits how the shards other shard will refresh


(Mark Walkom) #7

Why would you do that? Why not use wait_for - https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html


(Krishna Raj) #8

Hi Sir,
Im trying to update 100 document without refresh and seperately one document with refresh = wait_for its refreshing immediately all 100 document how.
I have Only one shard created for testing


(David Pilato) #9

This is expected.

Calling refresh with wait_for will wait for the next refresh cycle.

If you indexed 100 documents then 1 more doc, the last operation will wait for the "101 documents to be refreshed".


(Krishna Raj) #10

Sorry for Disturbing

But if we do that it is same as calling refresh right
Can i refresh only particular document instead of whole shard


(David Pilato) #11

But if we do that it is same as calling refresh right

No. It's waiting for the next refresh. It's not calling refresh.

Can i refresh only particular document instead of whole shard

No.


(system) #12

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.