Review main Merged

18290[FEATURE] Find best-matching local storage instead of default-storage

Stefan Neufeind CR +2 V +2 Normal +131 −7 updated 08/05/13, 16:20

Commit message

If no storage-UID is given usually the default-storage will be
used ("legacy-storage"). Some problems with not up-to-date
index-records etc. can be prevented by using a matching storage
instead of falling back to the default-storage (ID 0).

Implement search for best matching storage.

Review

  • Code review CR +2
    • Andreas Wolf +2
  • Verified V +2
    • Andreas Wolf +2

Issues 1

Files 3

Review log 32

Show 7 earlier messages
  1. Stefan Neufeind commented on patch set 1 05/27/13, 17:19

    Might be possible to improve it here and there. But please see what you think about searching for a proper storage instead of going for the default-storage (legacy-storage). As I described on forge (and in an email to the TYPO3-core-mailinglist as of today) some problems with fetching outdated fileIndexRecords or so can be prevented when using a "real" storage (usually the auto-created fileadmin-storage) instead of falling back to the default-storage.
  2. Stefan Neufeind commented on patch set 1 05/27/13, 17:19

    The problem imho is that using the default-storage gets us in various kinds of trouble. So using a regular storage where applicable might imho be our best choice. If you've got an idea how to speed this up easily or so, I'd be delighted if you could submit an enhancement (or share some thoughts with me, maybe offlist if you wish).
  3. Steffen Ritter commented on patch set 1 05/27/13, 17:19

    As this might be useful in some context I really fear, it will have massive impact on performance. At least the requery of storages from db an object recreation must be prevented with a local static cache. Perhaps even the strings only might be kept in memory....
  4. Steffen Ritter commented on patch set 1 05/27/13, 17:19

    +1 for the idea after giving it a second thought perfomance: resource factory is a singleton; store the results in an array to prevent requering: either make a "static" member var within function or create an instance variable in the object - on first access build the array, afterwards use the array for detection. array('COMMON_BASE_BATH' => 'STORAGE_UID); Anyhow I consider this as a crucial bugfix which desperetaly needs to go into 6.0, too
  5. Stefan Neufeind commented on patch set 2 05/27/13, 17:19

    (2 inline comments)
  6. Steffen Ritter uploaded patch set 2 05/27/13, 17:19

  7. Steffen Ritter uploaded patch set 3 05/27/13, 17:19

  1. Steffen Ritter uploaded patch set 4 05/27/13, 17:19

  2. Philipp Gampe commented on patch set 2 05/27/13, 17:19

    Looks good to me, but someone else must approve
  3. Philipp Gampe commented on patch set 4 05/27/13, 17:19

    Verified; Looks good to me, but someone else must approve Tested with unit tests. Only minor cleanups since v2.
  4. Mr. Jenkins commented on patch set 1 05/27/13, 17:19

  5. Mr. Jenkins commented on patch set 2 05/27/13, 17:19

  6. Mr. Jenkins commented on patch set 3 05/27/13, 17:19

  7. Mr. Jenkins commented on patch set 4 05/27/13, 17:19

  8. Wouter Wolters commented on patch set 2 05/27/13, 17:19

    (3 inline comments)

    ResourceFactory.php:151

    type?

    ResourceFactory.php:153

    integer

    ResourceFactory.php:184

    To which variable belongs this comment?
  9. Steffen Ritter updated the commit message in patch set 4 07/06/13, 14:10

  10. Mr. Jenkins commented on patch set 5 07/06/13, 14:11

  11. Steffen Ritter uploaded patch set 6 07/06/13, 14:37

  12. Mr. Jenkins commented on patch set 6 07/06/13, 14:38

  13. Steffen Ritter voted on patch set 6 V +1 CR +1 07/06/13, 14:39

  14. Markus Klein uploaded patch set 7 07/06/13, 14:55

  15. Markus Klein voted on patch set 7 CR +1 07/06/13, 14:56

  16. Mr. Jenkins commented on patch set 7 07/06/13, 14:57

  17. Andreas Wolf commented on patch set 7 08/05/13, 15:54

    I'll push an updated version without the redundant method in a minute.

    StorageRepository.php:106

    This method already exists - see findByStorageType().
  18. Andreas Wolf uploaded patch set 8 08/05/13, 15:55

  19. Mr. Jenkins commented on patch set 8 08/05/13, 15:56

  20. Andreas Wolf commented on patch set 8 V +2 CR +2 08/05/13, 15:57

    Merging as SteffenR and me both gave +1. Patchset 6, which Steffen reviewed, has no substantial differences to the current one,
  21. Andreas Wolf uploaded patch set 9 08/05/13, 16:02

  22. Mr. Jenkins commented on patch set 9 08/05/13, 16:03

  23. Andreas Wolf commented on patch set 9 V +2 CR +2 08/05/13, 16:03

    Rebased to latest master.
  24. Andreas Wolf merged patch set 10 08/05/13, 16:03

  25. Philipp Gampe commented on patch set 10 08/05/13, 16:20

    EM is broken now: Call to a member function enableFields() on a non-object in typo3/sysext/core/Classes/Resource/StorageRepository.php on line 211