Review main Merged

2761[FEATURE] Use update-query to write fe_session data

Stefan Neufeind CR +2 V +2 Easy +20 −8 updated 06/03/13, 20:49

Commit message

Use an update-query to write the front end user session data
to the database instead of doing a delete- and insert-query.

Using only one update-query saves resources and avoids
an inconsistent state between the delete- and insert-query
(since no transactions were used).

Original patch by Netresearch.

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Georg Ringer +1
    • Jo Hasenau +1
    • Markus Klein +1
    • Xavier Perseguers +1
    • Helmut Hummel +1
    • Mario Rimann +1
  • Verified V +2
    • Christian Kuhn +2
    • Helmut Hummel +1

Issues 1

Files 1

Review log 43

Show 18 earlier messages
  1. Mario Rimann commented on patch set 1 07/31/11, 11:59

    I would prefer that you didn't submit this Only CGL nitpicking

    class.tslib_feuserauth.php:381

    CGL: Please remove space before (

    class.tslib_feuserauth.php:409

    CGL: Please remove space before (
  2. Björn Pedersen commented on patch set 1 07/31/11, 11:59

    Looks good to me, but someone else must approve
  3. Andreas Wolf commented on patch set 2 07/31/11, 11:59

    Looks good to me, but someone else must approve
  4. Mario Rimann commented on patch set 2 07/31/11, 11:59

    Looks good to me, but someone else must approve
  5. Stefan Neufeind uploaded patch set 2 07/31/11, 11:59

  6. Stefan Neufeind commented on patch set 2 07/31/11, 11:59

    (1 inline comment)
  7. Stefan Neufeind commented on patch set 2 07/31/11, 11:59

    CGL-update. Sorry, didn't spot those two spaces.
  8. Stefan Neufeind uploaded patch set 3 07/31/11, 11:59

  9. Stefan Neufeind commented on patch set 3 07/31/11, 11:59

    Took care of Philipp's comment regard the commit-message. Thanks a lot, you were right of course. Rest of reviews looked good. Maybe somebody could go for a "verified" and get it through?
  10. Stefan Neufeind commented on patch set 3 07/31/11, 11:59

    (1 inline comment)
  11. Stefan Neufeind commented on patch set 4 07/31/11, 11:59

    Could somebody please have a final look/try at this?
  12. Stefan Neufeind uploaded patch set 4 07/31/11, 11:59

  13. Markus Klein commented on patch set 3 1 comment 07/31/11, 11:59

    I would prefer that you didn't submit this
  14. Markus Klein commented on patch set 4 07/31/11, 11:59

    (2 inline comments)
  15. Markus Klein commented on patch set 4 07/31/11, 11:59

    Looks good to me, but someone else must approve
  16. Xavier Perseguers commented on patch set 4 07/31/11, 11:59

    Looks good to me, but someone else must approve
  17. Helmut Hummel commented on patch set 4 07/31/11, 11:59

    (1 inline comment) I'm not generally against this change, but wanted to be sure that anybody who voted +1 is aware of the fact, that this change will result in an extra database query even on sites that do not make use of fe_sessions at all. This might be a problem on high traffic sites with many new users hitting it, because for every new user a fe_session record is stored into the database. When we fixed the session fixation problem back then, we agreed to avoid an additional query during the frontend rendering. Nevertheless the "side-effect" of this change would be that the session cookie for fe_users would stay the same, as there would be a session record stored in the db for every user (repeating myself)
  18. Helmut Hummel commented on patch set 5 07/31/11, 11:59

    Fails; Do not submit OOps, this does not work. I will investigate
  1. Helmut Hummel uploaded patch set 5 07/31/11, 11:59

  2. Mario Rimann commented on patch set 6 07/31/11, 11:59

    Looks good to me, but someone else must approve
  3. Stefan Neufeind commented on patch set 6 07/31/11, 11:59

    Just to make sure: Is there a way to only send insert/update when FE-sessions are used? Is there already an issue tracking that or should we open one?
  4. Markus Klein commented on patch set 6 07/31/11, 11:59

    Looks good to me, but someone else must approve
  5. Xavier Perseguers commented on patch set 6 07/31/11, 11:59

    Looks good to me, but someone else must approve
  6. Helmut Hummel uploaded patch set 6 07/31/11, 11:59

  7. Helmut Hummel commented on patch set 6 07/31/11, 11:59

    Nobody willing to test this? ;)
  8. Helmut Hummel commented on patch set 6 07/31/11, 11:59

    Verified; Looks good to me, but someone else must approve OK, now I fixed the last changeset, by setting the sessionDataTimestamp in any place where the session data is fetched
  9. Helmut Hummel commented on patch set 6 07/31/11, 11:59

    @Stefan: This is actually the case with patch set 6. If no session data was found, and/ or session data is not changed, no insert/update query is done.
  10. Christian Kuhn commented on patch set 6 V 0 07/31/11, 11:59

    by team member; Looks good to me, approved
  11. Georg Ringer commented on patch set 2 07/31/11, 11:59

    Verified; Looks good to me, but someone else must approve
  12. Georg Ringer commented on patch set 6 1 comment 07/31/11, 11:59

    Looks good to me, but someone else must approve
  13. Steffen Gebert commented on patch set 4 07/31/11, 11:59

    Looks good to me, but someone else must approve Umm.. looks valid. This changes the behavior of fetchSessionData() a bit, as it now creates the session, if it does not exist. I'd like to have some other's opinion here, too. But I think we can go for it.
  14. Steffen Ritter commented on patch set 4 07/31/11, 11:59

    Looks good to me, but someone else must approve
  15. Philipp Gampe commented on patch set 2 07/31/11, 11:59

    I would prefer that you didn't submit this Please mind the comment. As the first line will go into changelog, this should strictly follow the standard.
    Please remove the "+" before feature.
  16. Philipp Gampe commented on patch set 4 07/31/11, 11:59

    Verified; Looks good to me, but someone else must approve
  17. Jo Hasenau commented on patch set 4 07/31/11, 11:59

    Looks good to me, but someone else must approve
  18. Jo Hasenau commented on patch set 6 07/31/11, 11:59

    Looks good to me, but someone else must approve
  19. Mr. Jenkins commented on patch set 1 07/31/11, 11:59

  20. Mr. Jenkins commented on patch set 2 07/31/11, 11:59

  21. Mr. Jenkins commented on patch set 3 07/31/11, 11:59

  22. Mr. Jenkins commented on patch set 4 07/31/11, 11:59

  23. Mr. Jenkins commented on patch set 5 07/31/11, 11:59

  24. Mr. Jenkins commented on patch set 6 07/31/11, 11:59

  25. Christian Kuhn merged patch set 6 07/31/11, 11:59