Review main Abandoned

18547[FEATURE] Only use one select to calculate page cache timeout

Alexander Opitz CR 0 V 0 Normal +204 −10 updated 12/14/14, 20:01

Commit message

To get the first time value we do 2 SQL select statements at the
moment but this can be combined in one SQL select statement. This
will save as time and reduces bandwidth to/from the SQL server.

The one SQL select statement from 4.6 had a bug and was changed
to use 2 SQL select statements instead of fixing the statement itself.
So this is a revert to the old source with the fixed statement.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 26

Show 1 earlier messages
  1. Alexander Opitz uploaded patch set 2 05/27/13, 17:19

  1. Alexander Opitz uploaded patch set 3 05/27/13, 17:19

  2. Alexander Opitz commented on patch set 3 05/27/13, 17:19

    Added Testcases, run them on 6.1 with DBAL and disabled "basic.sql_query.passthrough". So seems to work fine.
  3. Alexander Opitz commented on patch set 3 05/27/13, 17:19

    To run TestCases install phpunit extension and run from command line: typo3/cli_dispatch.phpsh phpunit --filter=getFirstTimeValueForRecord typo3/sysext/frontend/
  4. Alexander Opitz uploaded patch set 4 05/27/13, 17:19

  5. Alexander Opitz commented on patch set 4 05/27/13, 17:19

    I took the database test from DbBackendTest which aren't marked as Skipped and also create tables. If table creation failed, then we don't know if it is our table or not, so I will throw an exception now which should stop that test and mark it as failed.
  6. Dmitry Dulepov commented on patch set 5 05/27/13, 17:19

    I would prefer that you didn't submit this It does not look like this code is DBAL-compatible.
  7. Alexander Opitz commented on patch set 5 05/27/13, 17:19

    Fixed Exception failure.
  8. Alexander Opitz uploaded patch set 5 05/27/13, 17:19

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

    Is that patch dbal save?

    TypoScriptFrontendControllerTest.php:48

    If we really do this, we should use a more specific table name that is less likely to conflict with any existing table.

    TypoScriptFrontendControllerTest.php:53

    no commented code ;)

    TypoScriptFrontendControllerTest.php:321

    check if the table already exists here.
  10. Philipp Gampe commented on patch set 3 05/27/13, 17:19

    (3 inline comments) This looks more like a functional test, because we use DB values. Currently we do not have a base/API for functional tests. You have the removal of the table commented out. I guess this is not on purpose. I suggest to leave the unit test in, but mark them as skip before merging, because unit tests should not mess with the DB (if possible).
  11. Philipp Gampe commented on patch set 3 V 0 05/27/13, 17:19

    tested with unit tests without DBAL
  12. Mr. Jenkins commented on patch set 1 05/27/13, 17:19

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

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

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

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

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

    Verified; Looks good to me, but someone else must approve Tested with the unit-tests
  18. Rico Sonntag commented on patch set 1 05/27/13, 17:19

    Fails * Duplicate assignment to $selectFields[$field] * Do not use "is_null" anymore, use "=== null" instead * Returns different results as previous version * Provide unittest if possible * Consider using an Sub-SELECT like: SELECT MIN(t1.end) AS min FROM test AS t1 INNER JOIN (SELECT MIN(start) AS start FROM test WHERE start > 1) AS t2 ON t1.start = t2.start WHERE t1.end > 1
  19. Dmitry Dulepov commented on patch set 5 V -1 CR -2 10/22/13, 11:05

    The issue is not reproducible in TYPO3 4.7 or newer with two content elements as described in the bug report. getFirstTimeValueForRecord() returns time correctly. It looks like there is no need for this change.
  20. Alexander Opitz commented on patch set 5 10/22/13, 12:52

    @Dmitry The issue was resolved in issue #35684 but it uses 2 SQL Statements to get this goal. This fix only uses one SQL query. Thats why also this commit message was updated. But after your last review message "It does not look like this code is DBAL-compatible." which doesn't give me any clue nothing happened. I'm a bit disappointed about spending long time to work on solutions and get blocked by such answers.
  21. Alexander Opitz commented on patch set 5 02/13/14, 11:05

    @Dmitry, answer to my message(s) or remove your blocking review. I didn't get answer on mail about "It does not look like this code is DBAL-compatible." nor did I get answer to my last comment here.
  22. Tymoteusz Motylewski commented on patch set 5 02/13/14, 12:36

    it would be nice if the db tests were moved to functional tests, (see http://wiki.typo3.org/Functional_testing). Unit tests should not manipulate db.
  23. Alexander Opitz commented on patch set 5 09/23/14, 08:18

    @Dmitry This patch is now 1 1/2 year old, you are blocking it and don't write an answer. I wrote you mails and I added comments here to get an answer from you. But nothing happens. Please tell me what will not work with DBAL and pleas reread the long time ago updated commit message to understand what this patch does.
  24. Mathias Schreiber wrote 12/14/14, 17:03

    Topic changed from 38838 to Caching
  25. Christian Kuhn abandoned the change 12/14/14, 20:01

    Ok, thanks to Dmitry's not reacting on anything but blocking, this patch is now abandoned and can be re-pushed as new patch.