Source:
<code>public synchronized long getUpperLimit() { DebugLogger.logger.debug("[GET] Getting upper limit"); return clientPool.runWithRetry(new FunctionCheckedException<Client, Long, RuntimeException>() { @Override public Long apply(Client client) { ByteBuffer rowName = getRowName(); ColumnPath columnPath = new ColumnPath(AtlasDbConstants.TIMESTAMP_TABLE.getQualifiedName()); columnPath.setColumn(getColumnName()); ColumnOrSuperColumn result; try { result = client.get(rowName, columnPath, ConsistencyLevel.LOCAL_QUORUM); } catch (NotFoundException e) { result = null; } catch (Exception e) { throw Throwables.throwUncheckedException(e); } if (result == null) { DebugLogger.logger.info("[GET] Null result, setting timestamp limit to {}", CassandraTimestampUtils.INITIAL_VALUE); cas(client, null, CassandraTimestampUtils.INITIAL_VALUE); return CassandraTimestampUtils.INITIAL_VALUE; } currentLimit = extractUpperLimit(result); DebugLogger.logger.info("[GET] Setting cached timestamp limit to {}.", currentLimit); return currentLimit; } private long extractUpperLimit(ColumnOrSuperColumn result) { try { Column column = result.getColumn(); return PtBytes.toLong(column.getValue()); } catch (IllegalArgumentException e) { String msg = "Caught an IllegalArgumentException trying to convert the stored value to a long. " <START> + "This can happen if you attempt to run AtlasDB with a leader block after having " <END> + "previously migrated to the TimeLock server. Please contact AtlasDB support. " + "If you are attempting a reverse migration, please consult the documentation here: " + "<LINK_0>" + "reverse-migration.html (and also contact AtlasDB support)."; throw new IllegalStateException(msg, e); } } }); }</code><technical_language>a timelock block instead. run of hit error</technical_language>

Target:
public synchronized long getUpperLimit() { DebugLogger.logger.debug("[GET] Getting upper limit"); return clientPool.runWithRetry(new FunctionCheckedException<Client, Long, RuntimeException>() { @Override public Long apply(Client client) { ByteBuffer rowName = getRowName(); ColumnPath columnPath = new ColumnPath(AtlasDbConstants.TIMESTAMP_TABLE.getQualifiedName()); columnPath.setColumn(getColumnName()); ColumnOrSuperColumn result; try { result = client.get(rowName, columnPath, ConsistencyLevel.LOCAL_QUORUM); } catch (NotFoundException e) { result = null; } catch (Exception e) { throw Throwables.throwUncheckedException(e); } if (result == null) { DebugLogger.logger.info("[GET] Null result, setting timestamp limit to {}", CassandraTimestampUtils.INITIAL_VALUE); cas(client, null, CassandraTimestampUtils.INITIAL_VALUE); return CassandraTimestampUtils.INITIAL_VALUE; } currentLimit = extractUpperLimit(result); DebugLogger.logger.info("[GET] Setting cached timestamp limit to {}.", currentLimit); return currentLimit; } private long extractUpperLimit(ColumnOrSuperColumn result) { try { Column column = result.getColumn(); return PtBytes.toLong(column.getValue()); } catch (IllegalArgumentException e) { String msg = "Caught an IllegalArgumentException trying to convert the stored value to a long. " + "This can happen if you attempt to run AtlasDB without a timelock block after having " + "previously migrated to the TimeLock server. Please contact AtlasDB support. " + "If you are attempting a reverse migration, please consult the documentation here: " + "<LINK_0>" + "reverse-migration.html (and also contact AtlasDB support)."; throw new IllegalStateException(msg, e); } } }); }