Skip to content

Fix FsBlobContainer.moveBlobAtomic fallback on CIFS filesystems - #148777

Merged
michalborek merged 4 commits into
elastic:mainfrom
michalborek:fix/moveBlobAtomic
May 12, 2026
Merged

michalborek merged 4 commits into
elastic:mainfrom
michalborek:fix/moveBlobAtomic

Conversation

@michalborek

@michalborek michalborek commented May 11, 2026 •

Copy link
Copy Markdown
Contributor

The Files.createLink() in java states that in case of no hard-link support, the UnsupportedOperationException is thrown.
Unfortunately, in reality the UnixFileSystemProvider may throw a generic FileSystemException if a native method call fails for this very reason.

To handle this case, we're going to catch raw FileSystemException exceptions and call a safe fall-back that does not use hard links. If there is a different reason of this operation throwing exception, the fallback should handle this properly.

Relates: https://discuss.elastic.co/t/unable-to-create-snapshots-with-cifs-share-9-4-0/386271

Closes: #148811

@michalborek michalborek added >bug :Distributed/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. auto-backport Automatically create backport pull requests when merged branch:8.19 branch:9.3 v9.5.0 branch:9.4 labels May 11, 2026
@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

Hi @michalborek, I've created a changelog YAML for you.

@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@github-actions

github-actions Bot commented May 11, 2026 •

Copy link
Copy Markdown
Contributor

🔍 Preview links for changed docs

⏳ Building and deploying preview... View progress

This comment will be updated with preview links when the build is complete.

@github-actions

Copy link
Copy Markdown
Contributor

ℹ️ Important: Docs version tagging

👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version.

We use applies_to tags to mark version-specific features and changes.

Expand for a quick overview

When to use applies_to tags:

✅ At the page level to indicate which products/deployments the content applies to (mandatory)
✅ When features change state (e.g. preview, ga) in a specific version
✅ When availability differs across deployments and environments

What NOT to do:

❌ Don't remove or replace information that applies to an older version
❌ Don't add new information that applies to a specific version without an applies_to tag
❌ Don't forget that applies_to tags can be used at the page, section, and inline level

🤔 Need help?

@DaveCTurner DaveCTurner linked an issue May 12, 2026 that may be closed by this pull request

@DaveCTurner DaveCTurner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

Hi @michalborek, I've updated the changelog YAML for you.

@michalborek
michalborek merged commit 83e1e75 into elastic:main May 12, 2026
37 checks passed
@michalborek
michalborek deleted the fix/moveBlobAtomic branch May 12, 2026 09:11
@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

💚 Backport successful

Status Branch Result
✅ 9.4
✅ 9.3
✅ 8.19

elasticsearchmachine pushed a commit that referenced this pull request May 12, 2026
) (#148820)

The Files.createLink() in java states that in case of no hard-link support, the UnsupportedOperationException is thrown.
Unfortunately, in reality the UnixFileSystemProvider may throw a generic FileSystemException if a native method call fails for this very reason.

To handle this case, we're going to catch raw FileSystemException exceptions and call a safe fall-back that does not use hard links. If there is a different reason of this operation throwing exception, the fallback should handle this properly.
elasticsearchmachine pushed a commit that referenced this pull request May 12, 2026
) (#148818)

The Files.createLink() in java states that in case of no hard-link support, the UnsupportedOperationException is thrown.
Unfortunately, in reality the UnixFileSystemProvider may throw a generic FileSystemException if a native method call fails for this very reason.

To handle this case, we're going to catch raw FileSystemException exceptions and call a safe fall-back that does not use hard links. If there is a different reason of this operation throwing exception, the fallback should handle this properly.
szybia added a commit to szybia/elasticsearch that referenced this pull request May 12, 2026
…ilience

* upstream/main: (32 commits)
  ESQL: Add timeseries X type conflict tests (elastic#145187)
  Grant `cluster:monitor/xpack/info` to internal CPS user (elastic#148823)
  Re-run unmuted tests in the repeat-changed-tests pipeline (elastic#146501)
  Make streaming fetch chunk size cluster-dynamic (elastic#148705)
  Tweak testThrottlingMetrics config for stability (elastic#148762)
  Upgrade to log4j 2.26.0 (elastic#132166)
  ES|QL: Make histogram merge_over_time ignore unsupported temporalities (elastic#148714)
  [ESQLDS] Fix source jar dependency (elastic#148821)
  Add PromQL reference docs for HTTP API and limitations (elastic#148783)
  Aggs: Fix auto_date_histogram and date_histogram inside a global agg (elastic#147427)
  Stateless: source-side relocation phase metrics (elastic#148543)
  ES|QL|DS: fix HTTP 500 on PUT dataset name collision (elastic#148785)
  Fix FsBlobContainer.moveBlobAtomic fallback on CIFS filesystems (elastic#148777)
  Add ES|QL FieldExtract function for flattened type (elastic#148290)
  Add release notes for v9.4.1 release (elastic#148780)
  Updates link for networking-settings.md to correct target (elastic#148769)
  Add config.name mapping to fleet-agents index (elastic#148703)
  Mute org.elasticsearch.xpack.stateless.reshard.StatelessReshardMixedOperationsIT testMixedOperationsDuringSplit elastic#148809
  Mute org.elasticsearch.xpack.stateless.commits.StatelessFileDeletionIT testDeleteIndexWhileNodeStopping elastic#148807
  Slices: default use doc values in routing's doc_values mapping attribute. (elastic#148773)
  ...
elasticsearchmachine pushed a commit that referenced this pull request May 12, 2026
) (#148819)

The Files.createLink() in java states that in case of no hard-link support, the UnsupportedOperationException is thrown.
Unfortunately, in reality the UnixFileSystemProvider may throw a generic FileSystemException if a native method call fails for this very reason.

To handle this case, we're going to catch raw FileSystemException exceptions and call a safe fall-back that does not use hard links. If there is a different reason of this operation throwing exception, the fallback should handle this properly.
drempapis pushed a commit to drempapis/elasticsearch that referenced this pull request May 13, 2026
…tic#148777)

The Files.createLink() in java states that in case of no hard-link support, the UnsupportedOperationException is thrown.
Unfortunately, in reality the UnixFileSystemProvider may throw a generic FileSystemException if a native method call fails for this very reason.

To handle this case, we're going to catch raw FileSystemException exceptions and call a safe fall-back that does not use hard links. If there is a different reason of this operation throwing exception, the fallback should handle this properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >bug :Distributed/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. Team:Distributed Meta label for distributed team. v8.19.16 v9.3.5 v9.4.1 v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to create snapshots

3 participants