[wp-trac] [WordPress Trac] #60915: WP 6.5 - RecursiveDirectoryIterator causing E_WARNING errors in New Relic

WordPress Trac noreply at wordpress.org
Tue Apr 9 23:48:50 UTC 2024


#60915: WP 6.5 - RecursiveDirectoryIterator causing E_WARNING errors in New Relic
------------------------------------------------+--------------------------
 Reporter:  iCaleb                              |       Owner:  joemcgill
     Type:  defect (bug)                        |      Status:  closed
 Priority:  normal                              |   Milestone:  6.5.2
Component:  General                             |     Version:  6.5
 Severity:  trivial                             |  Resolution:  fixed
 Keywords:  has-patch fixed-major dev-reviewed  |     Focuses:  performance
------------------------------------------------+--------------------------

Comment (by lucasbustamante):

 I started seeing the same errors 1 month ago, while using the RC releases
 of 6.5, and I was waiting to see if a ticket like this would pop up,
 because at the time I couldn't track it down.

 By looking at the logic, the only possible explanation was an outdated PHP
 stat cache on `WP_FileSystem::dirlist()` method, because a file that had
 been deleted was passing `is_file`  check, which uses the stat cache. I'm
 not familiar with the micro-optimization that introduced this bug, but it
 was probably aimed at reducing disk reads by leveraging the stat cache?
 Again, I'm not familiar with the code, but maybe we could keep the
 optimization and lazy-load the disk read, by having a `clearstatcache` in
 that method - hopefully that's enough?

 https://app.slack.com/client/T024MFP4J/C02RQBWTW

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60915#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list