Skip to content

Comments

removes vestigial cache clear in bulk import#3339

Merged
keith-turner merged 1 commit intoapache:mainfrom
keith-turner:remove-vestegial-cache-clear
Apr 25, 2023
Merged

removes vestigial cache clear in bulk import#3339
keith-turner merged 1 commit intoapache:mainfrom
keith-turner:remove-vestegial-cache-clear

Conversation

@keith-turner
Copy link
Contributor

While working on #3337 code that cleared the table id cache for no apparent reason was found. Investigation indicates that the cache clear used to happen before a cache read. The cache read was removed, but the cache clear was left behind. This commit removes the cache clear. The following commit shows the old clear and then read.

Tables.clearCache(master.getInstance());
if (Tables.getTableState(master.getInstance(), bulkInfo.tableId) == TableState.ONLINE) {
return Utils.reserveHdfsDirectory(bulkInfo.sourceDir, tid);
} else {
throw new AcceptableThriftTableOperationException(bulkInfo.tableId.canonicalID(), null,
TableOperation.BULK_IMPORT, TableOperationExceptionType.OFFLINE, null);
}

While working on apache#3337 code that cleared the table id cache for no
apparent reason was found.  Investigation indicates that the cache clear
used to happen before a cache read. The cache read was removed, but the
cache clear was left behind.  This commit removes the cache clear.  The
following commit shows the old clear and then read.

https://github.com/apache/accumulo/blob/ff8c875b83880c1fde3562f1280d6e20bc1ac682/server/master/src/main/java/org/apache/accumulo/master/tableOps/bulkVer2/PrepBulkImport.java#L89-L95
@ddanielr
Copy link
Contributor

LGTM.

@keith-turner keith-turner merged commit 2d7a63b into apache:main Apr 25, 2023
@ctubbsii ctubbsii added this to the 3.0.0 milestone Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants