private static boolean ensureOnValidEpoch(final Region region, final RegionEngine engine,
                                              final KVStoreClosure closure) {
        if (isValidEpoch(region, engine)) {
            return true;
        }
        // will retry on this error and status
        closure.setError(Errors.INVALID_REGION_EPOCH);
        closure.run(new Status(-1, "Invalid region epoch: %s", region));
        return false;
    }
Returns a heap-allocated iterator over the contents of the
database.
<p>
Caller should close the iterator when it is no longer needed.
The returned iterator should be closed before this db is closed.
<p>
<pre>
    KVIterator it = unsafeLocalIterator();
    try {
        // do something
    } finally {
        it.close();
    }
<pre/>
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/client/DefaultRheaKVStore.java