{"record":{"id":"e9c2c2ca70cbaa08","repo":"apache/iceberg","slug":"ignoring-provided-staging-location-as-new-manifest-e9c2c2","errorCode":null,"errorMessage":"Ignoring provided staging location as new manifests will be committed directly","messagePattern":"Ignoring provided staging location as new manifests will be committed directly","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteManifestsSparkAction.java","lineNumber":168,"sourceCode":"  @Override\n  public RewriteManifestsSparkAction specId(int specId) {\n    Preconditions.checkArgument(table.specs().containsKey(specId), \"Invalid spec id %s\", specId);\n    this.spec = table.specs().get(specId);\n    return this;\n  }\n\n  @Override\n  public RewriteManifestsSparkAction rewriteIf(Predicate<ManifestFile> newPredicate) {\n    this.predicate = newPredicate;\n    return this;\n  }\n\n  @Override\n  public RewriteManifestsSparkAction stagingLocation(String newStagingLocation) {\n    if (shouldStageManifests) {\n      this.outputLocation = newStagingLocation;\n    } else {\n      LOG.warn(\"Ignoring provided staging location as new manifests will be committed directly\");\n    }\n    return this;\n  }\n\n  @Override\n  public RewriteManifests.Result execute() {\n    String desc = String.format(\"Rewriting manifests in %s\", table.name());\n    JobGroupInfo info = newJobGroupInfo(\"REWRITE-MANIFESTS\", desc);\n    return withJobGroupInfo(info, this::doExecute);\n  }\n\n  @Override\n  public RewriteManifestsSparkAction sortBy(List<String> partitionFields) {\n    // Collect set of available partition columns to cluster on\n    Set<String> availablePartitionNames =\n        spec.fields().stream().map(PartitionField::name).collect(Collectors.toSet());\n\n    // Identify specified partition fields that are not available in the spec","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteManifestsSparkAction.java#L150-L186","documentation":"WARN log from RewriteManifestsSparkAction.stagingLocation: the caller supplied a staging location, but the rewrite plan does not actually stage manifests (shouldStageManifests is false, e.g. when manifests are committed directly without a separate staging phase), so the provided location is ignored.","triggerScenarios":"Calling RewriteManifestsSparkAction.stagingLocation(\"s3://...\") when shouldStageManifests is false — i.e. the current rewrite strategy writes new manifests directly as part of the commit instead of staging them first.","commonSituations":"Copy-pasted config from older Iceberg versions where staging was always used; passing staging-location on newer catalogs/versions that commit manifests directly; users expecting replacement manifests to land in a custom prefix for lifecycle reasons.","solutions":["Verify whether the target Iceberg version still uses staged manifests; if not, drop the staging-location option.","If a custom storage location is required, upgrade/downgrade to a version whose rewrite path stages manifests, or manually rewrite manifests.","Confirm the commit succeeds despite the ignored option; this is purely informational."],"exampleFix":"// before\nactions.rewriteManifests(table).stagingLocation(\"s3://bucket/staging\").execute();\n// after: only set when staging is actually used\nRewriteManifestsSparkAction a = actions.rewriteManifests(table);\nif (usesStagedManifests(table)) { a.stagingLocation(\"s3://bucket/staging\"); }\na.execute();","handlingStrategy":"validation","validationCode":"boolean stagingUsed = /* true only on versions/paths that stage manifests */; if (stagingUsed) action.stagingLocation(loc);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only pass staging-location when the rewrite path stages manifests","Check release notes for manifest staging behavior changes","Verify where replacement manifests land after rewrite if storage layout matters"],"tags":["logging","spark","manifests","ignored-option"],"backgroundTag":"ignored-option","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}