Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-27061 two phase bulkload is broken when SFT is in use. #4465

Merged
merged 1 commit into from
May 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
private final int rowLockWaitDuration;
static final int DEFAULT_ROWLOCK_WAIT_DURATION = 30000;

private Path regionDir;
private Path regionWalDir;
private FileSystem walFS;

// set to true if the region is restored from snapshot for reading by ClientSideRegionScanner
Expand Down Expand Up @@ -2147,11 +2147,11 @@ FileSystem getWalFileSystem() throws IOException {
* @throws IOException if there is an error getting WALRootDir
*/
public Path getWALRegionDir() throws IOException {
if (regionDir == null) {
regionDir = CommonFSUtils.getWALRegionDir(conf, getRegionInfo().getTable(),
if (regionWalDir == null) {
regionWalDir = CommonFSUtils.getWALRegionDir(conf, getRegionInfo().getTable(),
getRegionInfo().getEncodedName());
}
return regionDir;
return regionWalDir;
}

@Override
Expand Down Expand Up @@ -7255,7 +7255,7 @@ public Map<byte[], List<Path>> bulkLoadHFiles(Collection<Pair<byte[], String>> f
boolean reqTmp = store.storeEngine.requireWritingToTmpDirFirst();
if (bulkLoadListener != null) {
finalPath = bulkLoadListener.prepareBulkLoad(familyName, path, copyFile,
reqTmp ? null : regionDir.toString());
reqTmp ? null : fs.getRegionDir().toString());
}
Pair<Path, Path> pair = null;
if (reqTmp) {
Expand Down