EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Can we use a sleep function in event handler?

Posted: 08/10/2009 03:43:51
by Sangmin Lee (Standard support level)
Joined: 06/03/2009
Posts: 57

In our FS, one metadat server(MDS) supports many clients(Linux or Windows).
So, when several clients simultaneously request FS services, it's too busy to meet the response timeout.
In that case, I want to retry the request after some seconds.
Fuse on Linux supports multiple threads, so we used sleep(1) before retrying.

Can we also call sleep() in CbFs event handler functions?
Posted: 08/10/2009 04:31:57
by Volodymyr Zinin (Team)

It's possible to sleep in the event handler. But in order to avoid the event handler timeout (that is specified during the CallbackFileSystem.MountMedia call) either set it to some value greater than the timeout occurred during your metadata server accessing or use CallbackFileSystem.ResetTimeout in the event handler. Also you can disable the timeout processing by setting the timeout to zero.
Of course, if you sleep in the event handler then following I/O requests to the same file will wait until the current request finishes.



Topic viewed 1645 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!