Skip to content

Type count validator on first cycle after startup does not even initiate the validator #673

@arpitmalhotra

Description

@arpitmalhotra

We have a type count validator that simply validates all type counts have not deviated. However on first cycle of startup, even though the type counts deviated, the validator was not even kicked off.
See below hasChangedSinceLastCycle returns false. We do restore at startup

if (writeEngine.hasChangedSinceLastCycle()) {
                boolean schemaChangedFromPriorVersion = readStates.hasCurrent() &&
                        !writeEngine.hasIdenticalSchemas(readStates.current().getStateEngine());
                updateHeaderTags(writeEngine, toVersion, schemaChangedFromPriorVersion);

                // 3a. Publish, run checks & validation, then announce new state consumers
                publish(listeners, toVersion, artifacts);

                ReadStateHelper candidate = readStates.roundtrip(toVersion);
                cycleStatus.readState(candidate.pending());
                candidate = doIntegrityCheck ? 
                        checkIntegrity(listeners, candidate, artifacts, schemaChangedFromPriorVersion) :
                            noIntegrityCheck(candidate, artifacts);

                try {
                    validate(listeners, candidate.pending());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions