keith-turner commented on a change in pull request #1080: Parallelize
TransactionImpl.readUnread()
URL: https://github.com/apache/fluo/pull/1080#discussion_r340293771
##########
File path:
modules/core/src/main/java/org/apache/fluo/core/impl/TransactionImpl.java
##########
@@ -641,16 +634,8 @@ private void checkForOrphanedReadLocks(CommitData cd,
Map<Bytes, Set<Column>> lo
}
private void checkForOrphanedLocks(CommitData cd) throws Exception {
-
- Map<Bytes, Set<Column>> locksSeen = new HashMap<>();
-
- readUnread(cd, kve -> {
Review comment:
I think passing the locksSeen consumer is still needed. The intention
behind this code was to record all write locks resolved so those could be
avoided when processing read locks. So I think ParallelSnapshot scanner should
take a writeLocksSeen parameter in addition to readLocksSeen. It can populate
writeLocksSeen like SnapshotScanner was doing.
In `ParallelSnapshotScanner.scan(Map, List)` I think the following change
could be made.
```java
// snippet from scan(...) method
case LOCK:
locks.add(entry);
// add following line.. and also add writeLocksSeen instance var
writeLocksSeen.accept(entry);
break;
// end snippet
```
Sorry I didn't notice the difference between the read and write locks seen
when you asked about this on the issue. Only noticed it when taking a deeper
dive.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services