From: Vladislav Shpilevoy via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Cyrill Gorcunov <gorcunov@gmail.com> Cc: tml <tarantool-patches@dev.tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] limbo: introduce request processing hooks Date: Mon, 12 Jul 2021 23:20:17 +0200 [thread overview] Message-ID: <51e97609-c593-0693-1133-ae09dfbc78cc@tarantool.org> (raw) In-Reply-To: <YOv4yNnQVLgLHrkr@grain> On 12.07.2021 10:09, Cyrill Gorcunov via Tarantool-patches wrote: > On Mon, Jul 12, 2021 at 10:03:32AM +0200, Vladislav Shpilevoy wrote: >>> >>> Now imagine the following: we validated the incoming packet and >>> remember its term in promote_term_map, then we start writting >>> this packet into our WAL and write procedure failed. >> >> That is the core problem of your entire approach - why do you imagine >> we update promote_term_map before writing to WAL? We do not do that. > > We don't do that now, and this is all this patch about - we must not > write the PROMOTE from split-brained node into our wal file at all, > for exactly this reason I splitted processing into phases: "filter" and > "application". Я вижу, я не могу на английском объяснить. Да, мы не делаем этого сейчас. Зачем ты начинаешь это делать в своем патче? Ничего не должно меняться до записи в WAL. Ни vclock с термами, ни что-либо еще. Лимб должен быть const пока запись в WAL не кончена. Я вижу, что ты split processing, но ты на самом деле сделал не filter и application. Ты сделал apply part 1 и apply part 2. У тебя обе стадии меняют лимб. Зачем? Filter не должен менять вообще ничего. Только проверять и отсеивать с ошибкой, если что не так. >> And you should not do that. Before WAL write there should no be any >> changes. **Zero changes before WAL write**. Before you write to WAL, >> you can only validate requests. Using `const struct txn_limbo *`. With >> zero changes. > > If we write screwed PROMOTEs request into our WAL then this patch is not > needed at all. Я не говорил, что надо писать плохие PROMOTE. Я говорю, что ты можешь их отсеивать с ошибкой не делая никаких изменений состояния лимба до записи в WAL. Я так понимаю, ты пытаешься как-то защититься от того, что одновременно пришло несколько PROMOTE, и пока один пишется, надо остальные сразу отлупить? Так делает для обычных данных аплаер - он двигает vclock кластера до записи в WAL, и копирует его в replicaset.vclock если запись удалась. При этом если во время записи придут еще такие же транзакции от других инстансов, то они сразу отфильтруются. Но в лимбе нет такой проблемы, что все надо делать параллельно. При любых "паралеллельных" промоутах, конфирмах и прочих изменениях состояния лимба лучше просто брать на него лок и все. Эти вещи параллельно от разных инстансов приходить не должны во время нормальной работы, так что это по перфу самого частого случая не ударит нисколько, а код упростит значительно.
next prev parent reply other threads:[~2021-07-12 21:20 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-10 22:28 Cyrill Gorcunov via Tarantool-patches 2021-07-11 14:00 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-11 18:22 ` Cyrill Gorcunov via Tarantool-patches 2021-07-12 8:03 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-12 8:09 ` Cyrill Gorcunov via Tarantool-patches 2021-07-12 21:20 ` Vladislav Shpilevoy via Tarantool-patches [this message] 2021-07-12 22:32 ` Cyrill Gorcunov via Tarantool-patches 2021-07-13 19:32 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-12 8:01 ` Serge Petrenko via Tarantool-patches 2021-07-12 8:04 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-12 8:12 ` Cyrill Gorcunov via Tarantool-patches 2021-07-12 8:23 ` Cyrill Gorcunov via Tarantool-patches 2021-07-12 21:20 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-12 22:34 ` Cyrill Gorcunov via Tarantool-patches 2021-07-12 9:43 ` Cyrill Gorcunov via Tarantool-patches 2021-07-12 15:48 ` Cyrill Gorcunov via Tarantool-patches 2021-07-12 16:49 ` Serge Petrenko via Tarantool-patches 2021-07-12 17:04 ` Cyrill Gorcunov via Tarantool-patches 2021-07-12 21:20 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-12 21:52 ` Cyrill Gorcunov via Tarantool-patches 2021-07-12 7:54 ` Serge Petrenko via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=51e97609-c593-0693-1133-ae09dfbc78cc@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=gorcunov@gmail.com \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH] limbo: introduce request processing hooks' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox