Review main Merged

35838[FEATURE] Add gracetime for session-timestamp-updates

Stefan Neufeind CR +2 V +2 Easy +3 −2 updated 01/30/15, 18:15

Commit message

Don't update the session-timestamp more often than
needed. Skipping updates for some seconds/minutes
makes no difference but may save quite some
updates.

Review

  • Code review CR +2
    • Wouter Wolters +2
    • Stefan Neufeind +1
    • Christian Kuhn +1
  • Verified V +2
    • Wouter Wolters +2
    • Christian Kuhn +1

Issues 1

Files 1

Review log 19

  1. Stefan Neufeind uploaded patch set 1 01/06/15, 16:39

  2. Stefan Neufeind commented on patch set 1 01/06/15, 16:40

    Of course this still needs an rst-file to be complete :-) But what do you think?
  3. Markus Klein commented on patch set 1 01/06/15, 17:06

    I wouldn't use a new configuration option, but use the lifetime. Lets say 50% of the lifetime
  4. Stefan Neufeind commented on patch set 1 01/06/15, 17:19

    There might be people who use the timestamp to display which users are "active" (action within last X minutes or so) while their lifetime is larger. I guess 60 seconds everybody should be able to tolerate in almost any setup. We personally use a larger value. On the other hand, we have a larger lifetime but it would be great to get signs of life at least every few minutes or so. We might default it to 0 and use some other default internally then. But I felt 60 seconds if perfectly fine - and easily adjustable.
  5. Markus Klein commented on patch set 1 01/06/15, 17:51

    Ok, fine with me then. Just provide good/strong defaults ;-)
  6. Markus Klein commented on patch set 1 01/06/15, 17:53

    We really need to find a perfect description, otherwise people will have no clue what this is about.

    DefaultConfiguration.php:294

    that might be a bit misleading. session-activity

    DefaultConfiguration.php:294

    too long ago => "sessionTimestampUpdateGracetime" seconds ago
  7. Benni Mack commented on patch set 1 01/06/15, 23:47

    Why should this be configurable? I mean, we have lots of logic like that in the core that is hard-coded (and is fine that it's hard-coded). I think 30 seconds (non-configurable) could work. Apart from that: Love the idea!
  8. Stefan Neufeind commented on patch set 1 01/06/15, 23:58

    I'd usually be fine for it to be 30 minutes or whatever. (In worst case the timeout hits a bit less than 30 minutes earlier.) But others might prefer some lower value. Why would we not have it configurable (or even possible to disable)? But all fine with me. As I'm biased :-) please negotiate among the others.
  9. Stefan Neufeind commented on patch set 1 01/11/15, 14:23

    Hmm, it's not a big change actually. But I'm unsure how we find an agreement how to proceed.
  10. Philipp Gampe commented on patch set 1 01/22/15, 10:01

    grace time should be twice (or 4 times) of the default session update time in an idle backend
  11. Mathias Schreiber uploaded patch set 2 01/25/15, 17:58

  12. Mathias Schreiber commented on patch set 2 CR +1 V +1 01/25/15, 17:59

    Slightly changed wording and tried clearing up the description.
  13. Christian Kuhn commented on patch set 2 01/25/15, 23:23

    Philipp. if you mean with "default session update time" the ajax request that tests for be login validity (LoginRefresh.js) - this script does *not* trigger the update query (skipSessionUpdate is set).
  14. Christian Kuhn commented on patch set 2 01/25/15, 23:28

    Ok. I'm +1 for the optimization, but -1 for a configuration value. This is a rather exotic and academical thing trying to get rid of this query. I doubt many people will ever fiddle with this setting, since the benefit is usually very small. Let's just pick a sane value (I'd opt for 61 seconds for now and would prefer an odd number to scatter this over time a bit), and then hardcode this. I'll push an update.
  15. Christian Kuhn uploaded patch set 3 01/25/15, 23:43

  16. Christian Kuhn voted on patch set 3 CR +1 V +1 01/25/15, 23:44

  17. Stefan Neufeind commented on patch set 3 CR +1 01/25/15, 23:51

    I'm not much a friend of "arbitrary hardcoded" values. But 61 seconds is fine with me in general.
  18. Wouter Wolters voted on patch set 3 V +2 CR +2 01/30/15, 18:15

  19. Wouter Wolters merged patch set 3 01/30/15, 18:15