write Text
Writes text to this path with automatic retry on transient I/O failures.
On GCS-fuse mounts, Path.writeText() can fail with "Stale file handle" (ESTALE) during the close() call, which triggers the actual GCS upload. This happens when:
Multiple pods concurrently write to different subdirectories of the same GCS-fuse mount, causing metadata/generation conflicts on shared parent directory objects in GCS.
The GCS-fuse sidecar experiences transient memory pressure.
Stat cache serves stale generation numbers.
Since the error is transient, retrying after a short delay reliably resolves it.
Parameters
Maximum number of retry attempts (default: WriteWithRetryConstants.DEFAULT_MAX_RETRIES).
Initial delay before the first retry in milliseconds (default: WriteWithRetryConstants.DEFAULT_INITIAL_DELAY_MS). Each subsequent retry doubles the delay (exponential backoff).
Throws
if all retry attempts are exhausted.