[PATCH] memtx: don't delay deletion of temporary tuples during snapshot

Vladimir Davydov vdavydov.dev at gmail.com
Fri Jun 8 09:39:15 MSK 2018


On Fri, Jun 08, 2018 at 06:56:36AM +0300, Konstantin Osipov wrote:
> * Vladimir Davydov <vdavydov.dev at gmail.com> [18/06/04 23:48]:
> > Since tuples stored in temporary spaces are never written to disk, we
> > can always delete them immediately, even when a snapshot is in progress.
> > 
> > Closes #3432
> 
> OK to push.

Where to? 1.9 or 1.10?

The ticket is on 1.10 milestone, but there's a comment that says it
should be fixed in 1.9 ...

> > https://github.com/tarantool/tarantool/issues/3432
> > https://github.com/tarantool/tarantool/commits/gh-3432-memtx-dont-delay-free-temp-tuples

> > @@ -1309,3 +1311,97 @@ s:select()
> >  s:drop()
> >  ---
> >  ...
> > +for i = 1, 100 do box.space.test:insert{i} end
> > +---
> > +...
> > +-- Create a temporary space.
> > +count = 500
> 
> Please is there a chance this test writes less than 50MB of data
> to the database? A couple of order of magnitudes would be really
> nice.

The problem is tarantool won't start if the memory limit is < 40 MB.
So if we want to use less memory in this test, say 10 MB, we will have
to set memory limit to 40 + 10 MB, but that would raise questions, as
10 + 10 MB should fit in 50 MB. So I decided to insert 50 MB of data and
set limit 100 MB - this is clear, because 50 + 50 MB won't fit in 100 MB
no matter how much memory the core needs to start.

Anyway, the test runs with wal_mode=none so it should be fast.



More information about the Tarantool-patches mailing list