Skip to content

Commit

Permalink
[fix] specify options various is class field;use ThreadLocal remove i…
Browse files Browse the repository at this point in the history
…nstead of set null
  • Loading branch information
GOODBOY008 committed Oct 18, 2023
1 parent 8826753 commit f6c0156
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void close() {
} else if (nestCount == 0 && sqlSession != null) {
sqlSession.close();
sqlSession = null;
sessions.set(null);
sessions.remove();
nestCount = -1;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void option(String name, String value) {

@Override
public void options(Map<String, String> options) {
options.putAll(options);
this.options.putAll(options);

Check warning on line 37 in core/src/main/java/com/netease/arctic/optimizing/BaseOptimizingInput.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/netease/arctic/optimizing/BaseOptimizingInput.java#L37

Added line #L37 was not covered by tests
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ private void open() throws MetaException {
LOG.info("Waiting " + retryDelaySeconds + " seconds before next connection attempt.");
Thread.sleep(retryDelaySeconds * 1000);
} catch (InterruptedException ignore) {
ignore.printStackTrace();
LOG.warn("Unexpected InterruptedException while waiting between connection retries.", ignore);

Check warning on line 518 in trino/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java

View check run for this annotation

Codecov / codecov/patch

trino/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java#L518

Added line #L518 was not covered by tests
}
}
}
Expand Down Expand Up @@ -2310,7 +2310,7 @@ public NotificationEventResponse getNextNotification(
return rsp;
} else {
NotificationEventResponse filtered = new NotificationEventResponse();
if (rsp != null && rsp.getEvents() != null) {
if (rsp.getEvents() != null) {
for (NotificationEvent e : rsp.getEvents()) {
if (filter.accept(e)) {
filtered.addToEvents(e);
Expand Down

0 comments on commit f6c0156

Please sign in to comment.