Project

General

Profile

Actions

Bug #18376

closed

[keepstore] Avoid long-lived readdirent cookies in filesystem driver

Added by Tom Clegg over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Keep
Target version:
Story points:
-
Release relationship:
Auto

Description

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 by
  • doing open/readdir/close on the top-level directory, then open/readdir/close on each 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())

Subtasks 2 (0 open2 closed)

Task #18386: Review 18376-nfs-readdirentResolvedLucas Di Pentima11/16/2021Actions
Task #18473: review 18376-nfs-readdirentResolvedTom Clegg11/16/2021Actions

Related issues

Related to Arvados - Bug #18547: [keep-balance] Avoid redundant indexing when multiple keepstore servers use a single NFS mountResolvedTom Clegg12/06/2021Actions
Blocks Arvados - Idea #18518: Release Arvados 2.3.2ResolvedPeter Amstutz12/06/2021Actions
Actions

Also available in: Atom PDF