{"record":{"id":"8266f3ecd0780034","repo":"prestodb/presto","slug":"not-supported-8266f3","errorCode":"NOT_SUPPORTED","errorMessage":"Unable to rollback insert for table %s.%s. Some rows may have been written. Please run your insert again.","messagePattern":"Unable to rollback insert for table (.+?)\\.(.+?)\\. Some rows may have been written\\. Please run your insert again\\.","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"warning","filePath":"presto-accumulo/src/main/java/com/facebook/presto/accumulo/AccumuloMetadata.java","lineNumber":231,"sourceCode":"        return handle;\n    }\n\n    @Override\n    public Optional<ConnectorOutputMetadata> finishInsert(ConnectorSession session, ConnectorInsertTableHandle insertHandle, Collection<Slice> fragments, Collection<ComputedStatistics> computedStatistics)\n    {\n        clearRollback();\n        return Optional.empty();\n    }\n\n    private static void rollbackInsert(ConnectorInsertTableHandle insertHandle)\n    {\n        // Rollbacks for inserts are off the table when it comes to data in Accumulo.\n        // When a batch of Mutations fails to be inserted, the general strategy\n        // is to run the insert operation again until it is successful\n        // Any mutations that were successfully written will be overwritten\n        // with the same values, so that isn't a problem.\n        AccumuloTableHandle handle = (AccumuloTableHandle) insertHandle;\n        throw new PrestoException(NOT_SUPPORTED, format(\"Unable to rollback insert for table %s.%s. Some rows may have been written. Please run your insert again.\", handle.getSchema(), handle.getTable()));\n    }\n\n    @Override\n    public ConnectorTableHandle getTableHandle(ConnectorSession session, SchemaTableName tableName)\n    {\n        if (!listSchemaNames(session).contains(tableName.getSchemaName().toLowerCase(Locale.ENGLISH))) {\n            return null;\n        }\n\n        // Need to validate that SchemaTableName is a table\n        if (!this.listViews(session, Optional.of(tableName.getSchemaName())).contains(tableName)) {\n            AccumuloTable table = client.getTable(tableName);\n            if (table == null) {\n                return null;\n            }\n\n            return new AccumuloTableHandle(\n                    connectorId,","sourceCodeStart":213,"sourceCodeEnd":249,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-accumulo/src/main/java/com/facebook/presto/accumulo/AccumuloMetadata.java#L213-L249","documentation":"Accumulo has no transactional rollback for inserted rows, so AccumuloMetadata.rollbackInsert always throws NOT_SUPPORTED. If a batch of Mutations partially succeeded before failing, some rows are already written and cannot be undone; the documented strategy is to rerun the insert, since rewriting the same mutations is idempotent.","triggerScenarios":"Any failed INSERT into an Accumulo table that triggers Presto's connector rollback path (beginInsert → rollbackInsert), i.e. an insert that failed mid-flight after some Mutations were flushed to Accumulo.","commonSituations":"Writer process crashes or Accumulo connection loss during a large INSERT; query killed mid-insert; underlying table dropped or tablet server failure while mutations are being written.","solutions":["Simply rerun the same INSERT statement — rows written identically are overwritten with the same values, making the retry safe.","If rerunning is undesirable, delete the partially written rows (e.g. via the Accumulo shell or a DELETE query) before retrying.","For strict correctness requirements, write to a staging table and atomically swap/rename into the final table.","Reduce insert batch size and improve writer stability to lower the chance of partial writes."],"exampleFix":"// before: assume rollback happened\n// after: retry the insert; duplicates are overwritten harmlessly\nINSERT INTO schema.table SELECT ... ;  // run again until success","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  connectorMetadata.finishInsert(...);\n} catch (PrestoException e) {\n  if (e.getErrorCode().toErrorCodeDetail().contains(\"NOT_SUPPORTED\")) {\n    // some rows may be written; rerun the same INSERT — rewrites are idempotent\n  }\n  throw e;\n}","preventionTips":["Design inserts to be idempotent (identical mutations overwrite the same values).","Keep insert batches small so retries are cheap.","Use staging table + rename swap when exactly-once semantics matter.","Ensure writer processes are stable and Accumulo connectivity is reliable before large loads."],"tags":["accumulo","no-rollback","insert","not-supported","idempotency"],"backgroundTag":"rollback-not-supported","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}