Extract cooperative IO from fiber.m.
Make all subsystems (administrative console, replication, memcached, binary protocol) use exception-based socket API (sio.m). Remove all fiber members related to socket I/O. Remove fiber->peer and fiber->cookie. The idea of the cookie is to preserve in the WAL the originator of the request. This information is, however, lost when saving a snapshot. To my knowledge there is no use of this functionality, apart from pretty-printing the WAL. Peer is like cookie, but is textual and is used for logging. However, now, as long as network errors occur outside fiber context, most of the usefulness is lost. The only remaining case is when someone is trying to execute a write request on a read-only port. For all other cases, sio.m already supplies SocketError with peer name, and this is where it's most useful.
Showing
- include/coio.h 97 additions, 0 deletionsinclude/coio.h
- include/coio_buf.h 63 additions, 0 deletionsinclude/coio_buf.h
- include/evio.h 4 additions, 2 deletionsinclude/evio.h
- include/fiber.h 5 additions, 47 deletionsinclude/fiber.h
- mod/box/box.m 24 additions, 12 deletionsmod/box/box.m
- mod/box/memcached-grammar.m 284 additions, 316 deletionsmod/box/memcached-grammar.m
- mod/box/memcached-grammar.rl 5 additions, 9 deletionsmod/box/memcached-grammar.rl
- mod/box/memcached.h 3 additions, 1 deletionmod/box/memcached.h
- mod/box/memcached.m 38 additions, 26 deletionsmod/box/memcached.m
- mod/box/txn.m 1 addition, 3 deletionsmod/box/txn.m
- src/CMakeLists.txt 2 additions, 0 deletionssrc/CMakeLists.txt
- src/admin.m 69 additions, 67 deletionssrc/admin.m
- src/admin.rl 16 additions, 14 deletionssrc/admin.rl
- src/coio.m 302 additions, 0 deletionssrc/coio.m
- src/coio_buf.m 31 additions, 0 deletionssrc/coio_buf.m
- src/evio.m 3 additions, 2 deletionssrc/evio.m
- src/exception.m 1 addition, 1 deletionsrc/exception.m
- src/fiber.m 16 additions, 473 deletionssrc/fiber.m
- src/iproto.m 25 additions, 24 deletionssrc/iproto.m
- src/replica.m 60 additions, 78 deletionssrc/replica.m
Loading
Please register or sign in to comment