{"record":{"id":"59eea15ae528d227","repo":"apache/hadoop","slug":"preconditions-failed","errorCode":"PRECONDITIONS_FAILED","errorMessage":"Constraints of request were unsatisfiable on %s. Version %s was unavailable","messagePattern":"Constraints of request were unsatisfiable on (.+?)\\. Version (.+?) was unavailable","errorType":"exception","errorClass":"RemoteFileChangedException","httpStatus":412,"severity":"error","filePath":"hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/ChangeTracker.java","lineNumber":235,"sourceCode":"  }\n\n  /**\n   * Process an exception generated against the change policy.\n   * If the exception indicates the file has changed, this method throws\n   * {@code RemoteFileChangedException} with the original exception as the\n   * cause.\n   * @param e the exception\n   * @param operation the operation performed when the exception was\n   * generated (e.g. \"copy\", \"read\").\n   * @throws RemoteFileChangedException if the remote file has changed.\n   */\n  public void processException(SdkException e, String operation) throws\n      RemoteFileChangedException {\n    if (e instanceof AwsServiceException) {\n      AwsServiceException serviceException = (AwsServiceException)e;\n      if (serviceException.statusCode() == SC_412_PRECONDITION_FAILED) {\n        versionMismatches.versionMismatchError();\n        throw new RemoteFileChangedException(uri, operation, String.format(\n            RemoteFileChangedException.PRECONDITIONS_FAILED\n                + \" on %s.\"\n                + \" Version %s was unavailable\",\n            getSource(),\n            getRevisionId()),\n            serviceException);\n      }\n    }\n  }\n\n  /**\n   * Process metadata response from server for validation against the change\n   * policy.\n   * @param metadata metadata returned from server\n   * @param operation operation in progress\n   * @throws PathIOException raised on failure\n   * @throws RemoteFileChangedException if the remote file has changed.\n   */","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/ChangeTracker.java#L217-L253","documentation":"Error \"Constraints of request were unsatisfiable on %s. Version %s was unavailable\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/ChangeTracker.java:235 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The object version or etag changed between listing and read; retry the operation to pick up the current version."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}