boolean isConsistent(String indexName, TaskMonitor monitor)
			throws IOException, CancelledException {
		synchronized (db) {

			if (rootBufferId < 0) {
				return true;
			}

			monitor.setMessage("Check Table " + getName());

			boolean consistent;
			try {
				BTreeNode rootNode = getBTreeNode(rootBufferId);
				consistent = rootNode.isConsistent(getName(), monitor);
			}
			catch (IOException t) {
				Msg.debug(this, "Consistency Error (" + getName() +
					"): failed to fetch root buffer: " + t.getMessage());
				return false;
			}
			finally {
				nodeMgr.releaseNodes();
			}

			// Check consistency of index tables
			for (int indexedColumn : indexedColumns) {
				IndexTable indexTable = secondaryIndexes.get(indexedColumn);
				monitor.setMessage("Check Table " + getName() + "." +
					schema.getFieldNames()[indexTable.getColumnIndex()]);
				consistent &= indexTable.isConsistent(monitor);
			}

			HashMap<Integer, Integer> missingIndexRecMap = new HashMap<>();
			int actualCount = 0;
			RecordIterator recIter = iterator();
			while (recIter.hasNext()) {
				DBRecord rec = recIter.next();
				++actualCount;

				// Check for bad index tables (missing or invalid entries)
				for (int indexedColumn : indexedColumns) {
					IndexTable indexTable = secondaryIndexes.get(indexedColumn);
					Field f = rec.getField(indexedColumn);
					if (indexTable.isSparseIndex && f.isNull()) {
						continue; // skip unindexed field
					}
					boolean found = false;
					Field[] keys = indexTable.findPrimaryKeys(f);
					for (Field key : keys) {
						if (key.equals(rec.getKeyField())) {
							found = true;
							break;
						}
					}
					if (!found) {
						consistent = false;
						Integer missing = missingIndexRecMap.get(indexTable.getColumnIndex());
						if (missing == null) {
							missingIndexRecMap.put(indexTable.getColumnIndex(), 1);
						}
						else {
							missingIndexRecMap.put(indexTable.getColumnIndex(), missing + 1);
						}
						logIndexConsistencyError(
							schema.getFieldNames()[indexTable.getColumnIndex()],
							"Index table does not reference record key: " +
								rec.getKeyField().getValueAsString());
					}
				}

			}
			if (actualCount != getRecordCount()) {
				consistent = false;
				logIndexConsistencyError(indexName,
					"Table record count inconsistent: iterator-count=" + actualCount +
						" stored-count=" + getRecordCount());
			}
			for (int indexCol : missingIndexRecMap.keySet()) {
				int missing = missingIndexRecMap.get(indexCol);
				logIndexConsistencyError(schema.getFieldNames()[indexCol],
					"Index is missing " + missing + " record references");
			}

			// Check for bad index tables (missing or invalid entries)
			for (int indexedColumn : indexedColumns) {
				IndexTable indexTable = secondaryIndexes.get(indexedColumn);

				monitor.setMessage("Check Index " + getName() + "." +
					schema.getFieldNames()[indexTable.getColumnIndex()]);

				HashSet<Field> keySet = new HashSet<>();
				int extra = 0;
				DBFieldIterator keyIterator = indexTable.keyIterator();
				while (keyIterator.hasNext()) {
					Field key = keyIterator.next();
					if (getRecord(key) == null) {
						++extra;
					}
					if (!keySet.add(key)) {
						logIndexConsistencyError(
							schema.getFieldNames()[indexTable.getColumnIndex()],
							"Index table references duplicate key: " + key.getValueAsString());
					}
				}
				if (extra != 0) {
					consistent = false;
					logIndexConsistencyError(schema.getFieldNames()[indexTable.getColumnIndex()],
						"Index table references " + extra + " nonexistent record keys");
				}
			}

			return consistent;
		}
	}
Check the consistency of this table and its associated index tables.
@param monitor task monitor
@return true if consistency check passed, else false
@throws IOException thrown if IO error occurs 
@throws CancelledException is task was cancelled
Ghidra/Framework/DB/src/main/java/db/Table.java