]> Sergey Matveev's repositories - public-inbox.git/commit
lei/store: use SOCK_SEQPACKET rather than pipe
authorEric Wong <e@80x24.org>
Sun, 19 Sep 2021 12:50:22 +0000 (12:50 +0000)
committerEric Wong <e@80x24.org>
Sun, 19 Sep 2021 19:52:45 +0000 (19:52 +0000)
commitcbc2890cb89b81cb6b9e8fabf3f196d9a6110dce
tree5e8fc56e04b6b52d28c5853aca1bb5f9b98f36b7
parent12775b5be53db1244b9cb32ae2ef90f105735e1b
lei/store: use SOCK_SEQPACKET rather than pipe

This has several advantages:

* no need to use ipc.lock to protect a pipe for non-atomic writes

* ability to pass FDs.  In another commit, this will let us
  simplify lei->sto_done_request and pass newly-created
  sockets to lei/store directly.

disadvantages:

- an extra pipe is required for rare messages over several
  hundred KB, this is probably a non-issue, though

The performance delta is unknown, but I expect shards
(which remain pipes) to be the primary bottleneck IPC-wise
for lei/store.
12 files changed:
lib/PublicInbox/LEI.pm
lib/PublicInbox/LeiImport.pm
lib/PublicInbox/LeiImportKw.pm
lib/PublicInbox/LeiIndex.pm
lib/PublicInbox/LeiInput.pm
lib/PublicInbox/LeiNoteEvent.pm
lib/PublicInbox/LeiRemote.pm
lib/PublicInbox/LeiRm.pm
lib/PublicInbox/LeiStore.pm
lib/PublicInbox/LeiTag.pm
lib/PublicInbox/LeiToMail.pm
lib/PublicInbox/LeiXSearch.pm