Project

General

Profile

Bug #18376

Updated by Tom Clegg over 2 years ago

We have seen the current implementation of IndexTo fail (@error reading "/data/keep/13b": readdirent /data/keep/13b: errno 523@) when the underlying filesystem is NFS and the indexing operation takes over 4 hours. (Errno 523 is EBADCOOKIE in NFS.) 

 We can avoid relying unnecessarily on long-lived readdirent cookies simply by 
 * doing open/readdir/close on the top-level directory, then open/readdir/close on each subdirectory (the subdirectory. (The current implementation indexes each subdirectory before calling readdirent on the top-level directory to get the next subdir) 
 * calling ReadDir() to get DirEnt structs as quickly as possible, then calling lstat() to get sizes (the current implementation uses Readdir(), which interleaves calls to lstat() and readdirent()) subdir.)

Back