private List<ColumnFamilyHandle> mergeColumnFamilyHandleLists(final List<ColumnFamilyHandle> existingColumnFamilyHandles,
                                                                  final List<ColumnFamilyHandle> createdColumnFamilyHandles,
                                                                  final List<ColumnFamilyDescriptor> allDescriptors) throws RocksDBException {
        final List<ColumnFamilyHandle> columnFamilies = new ArrayList<>(allDescriptors.size());
        int existing = 0;
        int created = 0;

        while (existing + created < allDescriptors.size()) {
            final ColumnFamilyHandle existingHandle = existing < existingColumnFamilyHandles.size() ? existingColumnFamilyHandles.get(existing) : null;
            final ColumnFamilyHandle createdHandle = created < createdColumnFamilyHandles.size() ? createdColumnFamilyHandles.get(created) : null;
            if (existingHandle != null && Arrays.equals(existingHandle.getName(), allDescriptors.get(existing + created).getName())) {
                columnFamilies.add(existingHandle);
                existing++;
            } else if (createdHandle != null && Arrays.equals(createdHandle.getName(), allDescriptors.get(existing + created).getName())) {
                columnFamilies.add(createdHandle);
                created++;
            } else {
                throw new IllegalStateException("Unable to match up column family handles with descriptors.");
            }
        }
        return columnFamilies;
    }
match up the existing and created ColumnFamilyHandles with the existing/created ColumnFamilyDescriptors
so that the order of the resultant List matches the order of the allDescriptors argument
streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java