Skip to content
Open
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 @@ -2396,7 +2396,6 @@ private MetaDataMutationResult metaDataCoprocessorExec(String tableName, byte[]
private MetaDataMutationResult metaDataCoprocessorExec(String tableName, byte[] tableKey,
Batch.Call<MetaDataService, MetaDataResponse> callable, byte[] systemTableName)
throws SQLException {
Map<byte[], MetaDataResponse> results;
try {
boolean success = false;
boolean retried = false;
Expand All @@ -2410,10 +2409,12 @@ private MetaDataMutationResult metaDataCoprocessorExec(String tableName, byte[]
Table ht =
this.getTable(SchemaUtil.getPhysicalName(systemTableName, this.getProps()).getName());
try {
results = ht.coprocessorService(MetaDataService.class, tableKey, tableKey, callable);

assert (results.size() == 1);
MetaDataResponse result = results.values().iterator().next();
// The call goes to the one region that holds the table key, so it runs on the caller
// thread through a channel for that row. A region server handler can make this call,
// and the batch pool of the connection can be full of calls that wait for the same
// handlers. A call through that pool can then wait forever.
MetaDataResponse result =
callable.call(MetaDataService.newStub(ht.coprocessorService(tableKey)));
if (
result.getReturnCode() == MetaDataProtos.MutationCode.TABLE_NOT_IN_REGION
|| result.getReturnCode() == MetaDataProtos.MutationCode.FUNCTION_NOT_IN_REGION
Expand Down
Loading