pinpoint-apm/pinpoint · error · IllegalArgumentException
Unexpected schema change log id, expected :
Error message
Unexpected schema change log id, expected :
What it means
ChangeSetManager.verifyChangeLog validates each persisted HBase schema change log against the corresponding ChangeSet definition. If the change log's id does not equal the ChangeSet id, it throws IllegalArgumentException, indicating the applied-change history on disk does not match the change sets shipped in the application.
Source
Thrown at hbase/hbase-schema/src/main/java/com/navercorp/pinpoint/hbase/schema/core/ChangeSetManager.java:101
i++;
}
if (i >= changeSets.size()) {
return Collections.emptyList();
}
return new ArrayList<>(changeSets.subList(i, changeSets.size()));
}
private List<SchemaChangeLog> sortSchemaChangeLogs(List<SchemaChangeLog> schemaChangeLogs) {
List<SchemaChangeLog> sortedSchemaChangeLogs = new ArrayList<>(schemaChangeLogs);
sortedSchemaChangeLogs.sort(Comparator.comparingInt(SchemaChangeLog::getExecOrder));
return sortedSchemaChangeLogs;
}
private void verifyChangeLog(SchemaChangeLog schemaChangeLog, ChangeSet changeSet, int expectedOrder) {
String changeSetId = changeSet.getId();
String schemaChangeLogId = schemaChangeLog.getId();
if (!changeSetId.equals(schemaChangeLogId)) {
throw new IllegalArgumentException("Unexpected schema change log id, expected : " + changeSetId + " , was : " + schemaChangeLogId);
}
CheckSum actualCheckSum = schemaChangeLog.getCheckSum();
CheckSum expectedCheckSum = CheckSum.compute(actualCheckSum.getVersion(), changeSet.getValue());
if (!expectedCheckSum.equals(actualCheckSum)) {
throw new IllegalArgumentException("Unexpected schema change log check sum for : " + schemaChangeLogId);
}
int actualOrder = schemaChangeLog.getExecOrder();
if (expectedOrder != actualOrder) {
throw new IllegalArgumentException("Unexpected schema change log execution order for " + schemaChangeLogId + ", expected : " + expectedOrder + ", was : " + actualOrder);
}
}
}
View on GitHub (pinned to 744c3d3075)
Solutions
- Restore the original changeSet id so it matches the stored change log, or update the change log table to the new id.
- Never mutate ids of already-applied change sets; add a new change set instead.
- Confirm you are pointing at the correct HBase namespace/table — mismatched environments can hold foreign change logs.
Example fix
// before private static final String CHANGELOG_ID = "hbase-change-2-v2"; // renamed after being applied // after private static final String CHANGELOG_ID = "hbase-change-2-v1"; // keep original id; add a NEW change set for new work
Defensive patterns
Strategy: validation
Validate before calling
// Before deploying, diff changeSet ids against stored change logs
Set<String> appliedIds = executedChangeLogs.stream()
.map(SchemaChangeLog::getId).collect(Collectors.toSet());
Set<String> definedIds = changeSets.stream().map(ChangeSet::getId).collect(Collectors.toSet());
if (!appliedIds.containsAll(definedIds) && !Collections.disjoint(appliedIds, definedIds)) {
throw new IllegalStateException("ChangeSet ids drifted from applied change logs: " + appliedIds);
} Try / catch
try {
manager.getExecutedChangeSets(changeSets);
} catch (IllegalArgumentException e) {
logger.error("Change log verification failed: {}", e.getMessage());
} Prevention
- Treat applied changeSet ids as immutable; never rename after release.
- Add a CI check comparing change set ids against the production change log table.
- Keep separate change log tables per environment.
When it happens
Trigger: Calling getExecutedChangeSets or filterExecutedChangeSets when a SchemaChangeLog row read from HBase has an id different from the ChangeSet with the same position/order — typically after editing or renaming a change set id that was already applied.
Common situations: A developer changed a changeSet's id in a newer release while old change logs remain in the schema change log table, or change logs from a different database/pinpoint environment were written to the same table.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Unexpected schema change log check sum for :
- Unexpected schema change log execution order for
- Error applying changeSet :
- Cannot create an existing table :
- Cannot modify a non-existent table :
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/b1e068a2a9be114c.
Report an issue: GitHub.