@Test
    void testPurgeOldData_partial_2() {

        setPurgeAgeProperty(StroomDuration.ofDays(1));
        int refStreamDefCount = 8;
        int keyValueMapCount = 2;
        int rangeValueMapCount = 2;
        int entryCount = 2;
        int totalMapEntries = (refStreamDefCount * keyValueMapCount) + (refStreamDefCount * rangeValueMapCount);
        int totalKeyValueEntryCount = refStreamDefCount * keyValueMapCount * entryCount;
        int totalRangeValueEntryCount = refStreamDefCount * rangeValueMapCount * entryCount;
        int totalValueEntryCount = totalKeyValueEntryCount + totalRangeValueEntryCount;

        final List<RefStreamDefinition> refStreamDefs = loadBulkData(
                refStreamDefCount, keyValueMapCount, rangeValueMapCount, entryCount);

        refDataStore.logAllContents(LOGGER::debug);

        assertDbCounts(
                refStreamDefCount,
                totalMapEntries,
                totalKeyValueEntryCount,
                totalRangeValueEntryCount,
                totalValueEntryCount);

        refDataStore.purgeOldData();

        // do the purge - nothing is old/partial so no change expected
        assertDbCounts(
                refStreamDefCount,
                totalMapEntries,
                totalKeyValueEntryCount,
                totalRangeValueEntryCount,
                totalValueEntryCount);

        int expectedRefStreamDefCount = refStreamDefCount;

        assertThat(((DelegatingRefDataOffHeapStore) refDataStore).getEntryCount(ProcessingInfoDb.DB_NAME))
                .isEqualTo(expectedRefStreamDefCount);

        // Now change the states

        // These three should be purged
        setProcessingState(refStreamDefs.get(1), ProcessingState.LOAD_IN_PROGRESS);
        setProcessingState(refStreamDefs.get(3), ProcessingState.PURGE_IN_PROGRESS);
        setProcessingState(refStreamDefs.get(5), ProcessingState.TERMINATED);

        // These two won't be purged
        setProcessingState(refStreamDefs.get(6), ProcessingState.FAILED);
        setProcessingState(refStreamDefs.get(7), ProcessingState.PURGE_FAILED);

        LOGGER.info("------------------------purge-starts-here--------------------------------------");

        // do the purge
        refDataStore.purgeOldData();

        refDataStore.logAllContents(LOGGER::debug);

        expectedRefStreamDefCount = refStreamDefCount - 3;
        assertDbCounts(
                expectedRefStreamDefCount,
                (expectedRefStreamDefCount * keyValueMapCount) + (expectedRefStreamDefCount * rangeValueMapCount),
                expectedRefStreamDefCount * keyValueMapCount * entryCount,
                expectedRefStreamDefCount * rangeValueMapCount * entryCount,
                (expectedRefStreamDefCount * rangeValueMapCount * entryCount) +
                        (expectedRefStreamDefCount * rangeValueMapCount * entryCount));
    }
Each task is trying to load data for a different {@link RefStreamDefinition} so they will all be fighting over
the write txn
stroom-pipeline/src/test/java/stroom/pipeline/refdata/store/offheapstore/TestRefDataOffHeapStore.java