rdblue commented on a change in pull request #2206:
URL: https://github.com/apache/iceberg/pull/2206#discussion_r569765821



##########
File path: 
spark3/src/main/java/org/apache/iceberg/spark/source/SparkMergeScan.java
##########
@@ -111,7 +111,7 @@ public Statistics estimateStatistics() {
   }
 
   @Override
-  public void filterFiles(Set<String> locations) {
+  public synchronized void filterFiles(Set<String> locations) {

Review comment:
       The dynamic filter keeps a reference to the Filterable, which is this. 
As long as there is only one DynamicFilter, per Scan, then I don't think we 
really need this. It's fine to add it, but doesn't seem necessary.
   
   I wasn't sure earlier that we reused the dynamic filter. If so, we should be 
good to go. However, I do think that synchronization on `files()` and `tasks()` 
is a good idea because those will refresh the instance variable. So maybe 
adding it here is a good idea, too.




----------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to