)]}'
{
  "commit": "20671ffca7961c95707f64241abd59b249ee50d8",
  "tree": "068ab6adaa6433169fce64cb11e96056d64edb7e",
  "parents": [
    "43864ae4fd620136b73273cd155145854a5ae7d3"
  ],
  "author": {
    "name": "Maxim Dounin",
    "email": "mdounin@mdounin.ru",
    "time": "Wed May 30 15:40:34 2018 +0300"
  },
  "committer": {
    "name": "Maxim Dounin",
    "email": "mdounin@mdounin.ru",
    "time": "Wed May 30 15:40:34 2018 +0300"
  },
  "message": "Limit req: improved handling of negative times.\n\nNegative times can appear since workers only update time on an event\nloop iteration start.  If a worker was blocked for a long time during\nan event loop iteration, it is possible that another worker already\nupdated the time stored in the node.  As such, time since last update\nof the node (ms) will be negative.\n\nPrevious code used ngx_abs(ms) in the calculations.  That is, negative\ntimes were effectively treated as positive ones.  As a result, it was\nnot possible to maintain high request rates, where the same node can be\nupdated multiple times from during an event loop iteration.\nIn particular, this affected setups with many SSL handshakes, see\nhttp://mailman.nginx.org/pipermail/nginx/2018-May/056291.html.\n\nFix is to only update the last update time stored in the node if the\nnew time is larger than previously stored one.  If a future time is\nstored in the node, we preserve this time as is.\n\nTo prevent breaking things on platforms without monotonic time available\nif system time is updated backwards, a safety limit of 60 seconds is\nused.  If the time stored in the node is more than 60 seconds in the future,\nwe assume that the time was changed backwards and update lr-\u003elast\nto the current time.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "579b13c847fdb70eb19f7f2d4fd202fca3737bf4",
      "old_mode": 33188,
      "old_path": "src/http/modules/ngx_http_limit_req_module.c",
      "new_id": "63ec2de3f91c784d862ee708b196c7e26fcad5d4",
      "new_mode": 33188,
      "new_path": "src/http/modules/ngx_http_limit_req_module.c"
    }
  ]
}
