justinmclean commented on code in PR #7997:
URL: https://github.com/apache/gravitino/pull/7997#discussion_r2265684885
##########
core/src/test/java/org/apache/gravitino/storage/memory/TestMemoryEntityStore.java:
##########
@@ -176,17 +176,10 @@ public void close() throws IOException {
}
public Map<NameIdentifier, Entity> createSnapshot() {
- lock.lock();
- try {
- return entityMap.entrySet().stream()
- .collect(
- Collectors.toMap(
- Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1,
Maps::newHashMap));
- } catch (Exception e) {
- throw new RuntimeException("Failed to create snapshot of entity
store", e);
- } finally {
- lock.unlock();
- }
+ return entityMap.entrySet().stream()
Review Comment:
No problem, I think that's good.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]