)]}'
{
  "commit": "dee6b63a95577214d94d4b70ff6f77a55135511b",
  "tree": "89ced1f3ff8283bc70f825c48083e1055cdc9135",
  "parents": [
    "d327f04d09be7af7c492357849dcd36d9bd10515"
  ],
  "author": {
    "name": "Maxim Dounin",
    "email": "mdounin@mdounin.ru",
    "time": "Thu Oct 17 16:02:19 2019 +0300"
  },
  "committer": {
    "name": "Maxim Dounin",
    "email": "mdounin@mdounin.ru",
    "time": "Thu Oct 17 16:02:19 2019 +0300"
  },
  "message": "Events: available bytes calculation via ioctl(FIONREAD).\n\nThis makes it possible to avoid looping for a long time while working\nwith a fast enough peer when data are added to the socket buffer faster\nthan we are able to read and process them (ticket #1431).  This is\nbasically what we already do on FreeBSD with kqueue, where information\nabout the number of bytes in the socket buffer is returned by\nthe kevent() call.\n\nWith other event methods rev-\u003eavailable is now set to -1 when the socket\nis ready for reading.  Later in ngx_recv() and ngx_recv_chain(), if\nfull buffer is received, real number of bytes in the socket buffer is\nretrieved using ioctl(FIONREAD).  Reading more than this number of bytes\nensures that even with edge-triggered event methods the event will be\ntriggered again, so it is safe to stop processing of the socket and\nswitch to other connections.\n\nUsing ioctl(FIONREAD) only after reading a full buffer is an optimization.\nWith this approach we only call ioctl(FIONREAD) when there are at least\ntwo recv()/readv() calls.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "43d3b25a54563f8e9c905238f718b07400ffead6",
      "old_mode": 33188,
      "old_path": "auto/unix",
      "new_id": "ff9697a4eaa6203badb0ffb5464bdf4267d3ce3e",
      "new_mode": 33188,
      "new_path": "auto/unix"
    },
    {
      "type": "modify",
      "old_id": "ee9f854b6f551f4acabe45c3ab1c5f9c58f49bb6",
      "old_mode": 33188,
      "old_path": "src/event/modules/ngx_devpoll_module.c",
      "new_id": "590eb28e14640a78c9a1670689aaab21cfd37954",
      "new_mode": 33188,
      "new_path": "src/event/modules/ngx_devpoll_module.c"
    },
    {
      "type": "modify",
      "old_id": "76aee08c390045055b1673c507eb8d7c3863640c",
      "old_mode": 33188,
      "old_path": "src/event/modules/ngx_epoll_module.c",
      "new_id": "98e3ce7c826ffb23e29581109b61f45644ccdbe0",
      "new_mode": 33188,
      "new_path": "src/event/modules/ngx_epoll_module.c"
    },
    {
      "type": "modify",
      "old_id": "11ad0934efe15721687e87d5481dfdfec7b0379f",
      "old_mode": 33188,
      "old_path": "src/event/modules/ngx_eventport_module.c",
      "new_id": "f67c70457f493218117729c79e48a3c6ab603424",
      "new_mode": 33188,
      "new_path": "src/event/modules/ngx_eventport_module.c"
    },
    {
      "type": "modify",
      "old_id": "b46ab538abd6a39d695641535465a77df797b8b5",
      "old_mode": 33188,
      "old_path": "src/event/modules/ngx_poll_module.c",
      "new_id": "c16f0242e4a46f1e54da9b60e0168c95f40737c9",
      "new_mode": 33188,
      "new_path": "src/event/modules/ngx_poll_module.c"
    },
    {
      "type": "modify",
      "old_id": "06446219f3aaeeebacc010fa91a04a7e443e74c2",
      "old_mode": 33188,
      "old_path": "src/event/modules/ngx_select_module.c",
      "new_id": "b9fceb3b648be2f45a3ad5f293d7c2c78bfa23c4",
      "new_mode": 33188,
      "new_path": "src/event/modules/ngx_select_module.c"
    },
    {
      "type": "modify",
      "old_id": "9fe867f7904abb9584750b05638ffaf4c33f2a46",
      "old_mode": 33188,
      "old_path": "src/event/modules/ngx_win32_poll_module.c",
      "new_id": "2fbc1b376aef3040ec43ea16e5b9bc02dffe0cd4",
      "new_mode": 33188,
      "new_path": "src/event/modules/ngx_win32_poll_module.c"
    },
    {
      "type": "modify",
      "old_id": "8093a600b0e4a0d053bb6dc404582203b8bd0cc9",
      "old_mode": 33188,
      "old_path": "src/event/modules/ngx_win32_select_module.c",
      "new_id": "962514a3668fb4e6aa9be9a454c4a6b4c43c8ce8",
      "new_mode": 33188,
      "new_path": "src/event/modules/ngx_win32_select_module.c"
    },
    {
      "type": "modify",
      "old_id": "bb77c4ae664d8357c3bb1bb39a4385eef13503d9",
      "old_mode": 33188,
      "old_path": "src/event/ngx_event.h",
      "new_id": "97f9673c90dac71c00ab75a08108438b3cd4febd",
      "new_mode": 33188,
      "new_path": "src/event/ngx_event.h"
    },
    {
      "type": "modify",
      "old_id": "454cfdcad44e2c4569c2c639ac711111d73d4700",
      "old_mode": 33188,
      "old_path": "src/os/unix/ngx_readv_chain.c",
      "new_id": "a3577ce19212dc071d5abdf4f4977640bf77af2f",
      "new_mode": 33188,
      "new_path": "src/os/unix/ngx_readv_chain.c"
    },
    {
      "type": "modify",
      "old_id": "c85fd453c91bfffd842f5b73863d453865ebab9c",
      "old_mode": 33188,
      "old_path": "src/os/unix/ngx_recv.c",
      "new_id": "ddfae4dbee66069043bb7149d6686889a3b2ef1e",
      "new_mode": 33188,
      "new_path": "src/os/unix/ngx_recv.c"
    },
    {
      "type": "modify",
      "old_id": "fcc51533568e1abb744a5502c4b738c15f41ac60",
      "old_mode": 33188,
      "old_path": "src/os/unix/ngx_socket.h",
      "new_id": "ec66a6f830f8a70c88046ed37ee82c59137e3154",
      "new_mode": 33188,
      "new_path": "src/os/unix/ngx_socket.h"
    },
    {
      "type": "modify",
      "old_id": "05a39f4cc7be2ae0a30ef3b620dbd7722f33308c",
      "old_mode": 33188,
      "old_path": "src/os/win32/ngx_socket.c",
      "new_id": "b1b4afb8a0eeae43c846a58db61994d5de011dda",
      "new_mode": 33188,
      "new_path": "src/os/win32/ngx_socket.c"
    },
    {
      "type": "modify",
      "old_id": "f8a453d562bfb4615a36b13e23d1b8a63b2338f1",
      "old_mode": 33188,
      "old_path": "src/os/win32/ngx_socket.h",
      "new_id": "ab56bc8b34af55552d69ce82f2943149f941f81b",
      "new_mode": 33188,
      "new_path": "src/os/win32/ngx_socket.h"
    },
    {
      "type": "modify",
      "old_id": "4824d05a8759a3ca61391205fc27022349eb9cf4",
      "old_mode": 33188,
      "old_path": "src/os/win32/ngx_win32_config.h",
      "new_id": "96156870d0a6f533e74b2b921dd671d626ad5ba7",
      "new_mode": 33188,
      "new_path": "src/os/win32/ngx_win32_config.h"
    },
    {
      "type": "modify",
      "old_id": "1925f0b17ed178ff60b42fd7ec8f647615d7a93b",
      "old_mode": 33188,
      "old_path": "src/os/win32/ngx_wsarecv.c",
      "new_id": "ac883107b14991d1f5ca08231730770419ab1d35",
      "new_mode": 33188,
      "new_path": "src/os/win32/ngx_wsarecv.c"
    },
    {
      "type": "modify",
      "old_id": "2598e091c37ec786a0e5fbe1ce291bdcbeaf1951",
      "old_mode": 33188,
      "old_path": "src/os/win32/ngx_wsarecv_chain.c",
      "new_id": "87f02391152a2280e1913e4462fc3aa4b70064a0",
      "new_mode": 33188,
      "new_path": "src/os/win32/ngx_wsarecv_chain.c"
    }
  ]
}
