Tarantool development patches archive
 help / color / mirror / Atom feed
From: Georgy Kirichenko <georgy@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Subject: Re: [tarantool-patches] Re: [PATCH 1/2] Update lua space cache just after creation
Date: Fri, 31 Aug 2018 07:57:12 +0300	[thread overview]
Message-ID: <2482346.ervWByz9rK@home.lan> (raw)
In-Reply-To: <20180830120657.fhlkoqvowzckashl@esperanza>

[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]

> > 
> > +
> > +
> > +-- allocate a space id to prevent max space id update
> 
> Why?
If max space id should be updated then space creates in two commits - the first 
one update max space id and the second one - creates space. And then I can't 
schedule fibers to get execution when space is created but not yet commited.
> 
> > +trig = box.schema.space.create('trig')
> > +trig_id = trig.id
> > +trig:drop()
> > +trig = nil
> > +fiber = require('fiber')
> > +ch = fiber.channel(1)
> > +errinj = box.error.injection
> > +test_run:cmd("setopt delimiter ';'")
> > +-- check space exists just after creation
> > +errinj.set("ERRINJ_WAL_WRITE", true);
> > +_ = fiber.create(function ()
> > +        fiber.create(function ()
> > +            pcall(box.schema.space.create, 'trig', {id = trig_id})
> > +            ch:put(true)
> > +        end)
> > +        trig = box.space.trig
> > +    end);
> > +trig ~= nil;
> > +ch:get();
> > +--and not exists after rollback
> > +box.space.trig;
> > +test_run:cmd("setopt delimiter ''");
> > +
> > +errinj.set("ERRINJ_WAL_WRITE", false)


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-08-31  4:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28 16:19 [tarantool-patches] [PATCH 0/2] Box control event trigger Georgy Kirichenko
2018-08-28 16:19 ` [tarantool-patches] [PATCH 1/2] Update lua space cache just after creation Georgy Kirichenko
2018-08-30 12:06   ` Vladimir Davydov
2018-08-31  4:57     ` Georgy Kirichenko [this message]
2018-08-30 12:31   ` [tarantool-patches] " Konstantin Osipov
2018-08-31  4:53     ` Georgy Kirichenko
2018-08-28 16:19 ` [tarantool-patches] [PATCH 2/2] On ctl event trigger Georgy Kirichenko
2018-08-30 12:07   ` Vladimir Davydov
2018-08-30 12:10   ` Vladimir Davydov
2018-08-30 12:38   ` Vladimir Davydov
2018-08-30 13:04     ` Georgy Kirichenko
2018-08-30 13:21     ` Vladimir Davydov
2018-08-30 14:45       ` [tarantool-patches] " Konstantin Osipov
2018-08-30 14:40     ` Konstantin Osipov
2018-08-30 12:50   ` Konstantin Osipov

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=2482346.ervWByz9rK@home.lan \
    --to=georgy@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [tarantool-patches] Re: [PATCH 1/2] Update lua space cache just after creation' \
    /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