{"record":{"id":"29891675c731c534","repo":"apache/beam","slug":"last-updated-operation-failed-blobstoragefilesystem","errorCode":null,"errorMessage":"Last updated operation failed","messagePattern":"Last updated operation failed","errorType":"exception","errorClass":"BeamIOError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/io/azure/blobstoragefilesystem.py","lineNumber":263,"sourceCode":"      return self._blobstorageIO().size(path)\n    except Exception as e:  # pylint: disable=broad-except\n      raise BeamIOError(\"Size operation failed\", {path: e})\n\n  def last_updated(self, path):\n    \"\"\"Get UNIX Epoch time in seconds on the FileSystem.\n\n    Args:\n      path: string path of file.\n\n    Returns: float UNIX Epoch time\n\n    Raises:\n      ``BeamIOError``: if path doesn't exist.\n    \"\"\"\n    try:\n      return self._blobstorageIO().last_updated(path)\n    except Exception as e:  # pylint: disable=broad-except\n      raise BeamIOError(\"Last updated operation failed\", {path: e})\n\n  def checksum(self, path):\n    \"\"\"Fetch checksum metadata of a file on the\n    :class:`~apache_beam.io.filesystem.FileSystem`.\n\n    Args:\n      path: string path of a file.\n\n    Returns: string containing checksum\n\n    Raises:\n      ``BeamIOError``: if path isn't a file or doesn't exist.\n    \"\"\"\n    try:\n      return self._blobstorageIO().checksum(path)\n    except Exception as e:  # pylint: disable=broad-except\n      raise BeamIOError(\"Checksum operation failed\", {path, e})\n","sourceCodeStart":245,"sourceCodeEnd":281,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/io/azure/blobstoragefilesystem.py#L245-L281","documentation":"BlobStorageFileSystem.last_updated() returns the UNIX epoch modification time via BlobStorageIO.last_updated() and re-raises any exception as BeamIOError('Last updated operation failed', {path: e}). As with size(), a nonexistent path is one of the causes covered by this error.","triggerScenarios":"Calling fs.last_updated(path) on a missing blob or when the Azure SDK raises (auth failure, network error, insufficient permissions).","commonSituations":"Incremental pipeline logic that compares file timestamps against a watermark but the upstream file has not landed yet; timezone/copy mistakes producing wrong container paths; expired credentials.","solutions":["Check fs.exists(path) before reading timestamps","Inspect BeamIOError.exception_details[path] for the underlying Azure exception","Validate the azfs:// path format and container name","Refresh credentials / SAS tokens if the error is authentication-related"],"exampleFix":"// before\nmtime = fs.last_updated(path)\n// after\ntry:\n    mtime = fs.last_updated(path)\nexcept BeamIOError as e:\n    logging.warning(f\"last_updated failed for {path}: {e.exception_details}\")\n    mtime = 0  # treat as never-updated or re-raise as appropriate","handlingStrategy":"try-catch","validationCode":"if not fs.exists(path):\n    raise FileNotFoundError(f\"no such blob: {path}\")","typeGuard":null,"tryCatchPattern":"try:\n    mtime = fs.last_updated(path)\nexcept BeamIOError as e:\n    logging.error(\"last_updated failed for %s: %s\", path, e.exception_details)\n    mtime = 0  # or re-raise depending on watermark semantics","preventionTips":["Guard incremental/timestamp-based logic against absent upstream files","Refresh SAS tokens/credentials before long-running jobs","Validate path format early with parse_azfs_path","Add backoff retry for transient storage errors"],"tags":["python","apache-beam","azure-blob-storage","filesystem-io","error-wrapping"],"backgroundTag":"file-read-failed","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T21:17:11.552Z"}