Skip to content

Commit

Permalink
Number format exception is taken into account during detection of ava…
Browse files Browse the repository at this point in the history
…ilable memory.
  • Loading branch information
andrii0lomakin committed Nov 6, 2023
1 parent b611024 commit 85d850a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ private static long fetchMemInfoMemory() {

String[] memTotalParts = memTotalLine.split("\\s+");
return Long.parseLong(memTotalParts[1]) * 1024;
} catch (IOException e) {
} catch (NumberFormatException | IOException e) {
logger.error("Failed to read /proc/meminfo", e);
return Integer.MAX_VALUE;
}
Expand Down Expand Up @@ -1054,7 +1054,7 @@ public StreamObserver<IndexManagerOuterClass.UploadDataRequest> uploadVectors(St
private DataStore store;
private String indexName;

private Lock streamObserverLock = new ReentrantLock();
private final Lock streamObserverLock = new ReentrantLock();

@Override
public void onNext(IndexManagerOuterClass.UploadDataRequest value) {
Expand Down

0 comments on commit 85d850a

Please sign in to comment.