Issues

Select view

Select search mode

 
21 of 21

primaryKeyExists and indexExists preconditions create a new database snapshot on each execution

Fixed

Description

Each time the <primaryKeyExists/> or the <indexExists/> preconditions are run, they take a full database snapshot. <primaryKeyExists/> makes a call in the PrimaryKeyExistsPrecondition.check() function:

public void check(Database database, DatabaseChangeLog changeLog, ChangeSet changeSet) throws PreconditionFailedException, PreconditionErrorException { DatabaseSnapshot snapshot; try { snapshot = DatabaseSnapshotGeneratorFactory.getInstance().createSnapshot(database, getSchemaName(), null); } catch (DatabaseException e) { throw new PreconditionErrorException(e, changeLog, this); } ... }

and <indexExists/> makes a call in the JdbcDatabaseSnapshotGenerator.hasIndex() function:

public boolean hasIndex(String schemaName, String tableName, String indexName, Database database, String columnNames) throws DatabaseException { DatabaseSnapshot databaseSnapshot = createSnapshot(database, schemaName, null); if (databaseSnapshot.getIndex(indexName) != null) { return true; } ... }

We have a fairly large PostgreSQL data set on our test system and a database snapshot runs over 6700 queries.

Environment

None

Details

Reporter

Fix versions

Affects versions

Priority

Created January 23, 2013 at 3:36 PM
Updated June 20, 2013 at 3:31 AM
Resolved February 28, 2013 at 7:32 AM

Activity

Show:

Nathan VoxlandFebruary 28, 2013 at 7:32 AM

No longer does full snapshots

Flag notifications