Skip to content

ClickHouse loader fails on NFS storage - renameat2() not supported #158

@vangravs

Description

@vangravs

The Problem:

  1. Hard Dependency on renameat2() System Call

The seqr v2.6.7 code uses REFRESH EVERY X materialized views which require atomic renames via renameat2(). This system call is NOT supported on NFS, which is a extremely common
enterprise storage solution. This is a fundamental compatibility issue.

  1. No Graceful Degradation

The code has no fallback mechanism. It should:

  • Detect if the filesystem supports renameat2()
  • Fall back to regular materialized views (which work fine and auto-update)
  • Provide a clear error message instead of cryptic stack traces
  1. Silent Failures

The clickhouse-loader daemon fails silently every 5 minutes, creating _CLICKHOUSE_LOAD_FAIL markers without any user-visible notification in the UI. Users don't know data loading
failed unless they dig through:

  • Command-line marker files
  • ClickHouse pod logs
  • Pipeline runner logs

Potential fix:

 def refresh_materialized_views(...):
      for mv in materialized_views:
          try:
              # Try REFRESH-based approach
              logged_query(f"SYSTEM REFRESH VIEW {mv}")
          except Exception as e:
              if "UNSUPPORTED_METHOD" in str(e) or "renameat2" in str(e):
                  # Filesystem doesn't support atomic renames
                  # Fall back to regular MVs (no-op, they auto-update)
                  logger.warning(f"REFRESH views not supported on this filesystem, using auto-updating MVs")
                  continue
              raise

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions