Tarantool development patches archive
 help / color / mirror / Atom feed
From: "n.pettik" <korablev@tarantool.org>
To: Alex Khatskevich <avkhatskevich@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH] Fix ephemeral table next rowid generation
Date: Fri, 1 Jun 2018 14:50:39 +0300	[thread overview]
Message-ID: <492561F3-E9AF-4CBB-AC84-811F31BBBD0D@tarantool.org> (raw)
In-Reply-To: <95f6ed87-03fb-c0ad-76e1-3776a0714e8b@tarantool.org>

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


>> As for patch itself, I don’t like the idea to store rowid for ephemeral space
>> in cursor: if insertion in such space occurred not via SQL facilities, then
>> rowid would be wrong…Well, we know that rowid is always in
>> the last field, so why just don’t fetch value from last field and increment it?
> Rowid cannot be stored in the last field, because tuples are sorted by the first parts.

Wait, where is rowid stored now? AFAIU it is still placed in the last field.

> That means that means that greatest tuple may not has the greatest rowid.

Now I am thinking about introducing secondary index for table with rowid on the last field.
Could you take a look at code and say whether this idea feasible or not?
In this case, it would be easy to fetch max value from ‘last’ field and increment it.
Anyway even if this idea fails as well, lets come up with better solution.

PS add patches mailing list to receivers so that our conversation is available for everyone.


[-- Attachment #2: Type: text/html, Size: 2850 bytes --]

  parent reply	other threads:[~2018-06-01 11:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15 19:49 [tarantool-patches] " AKhatskevich
2018-05-31 23:53 ` [tarantool-patches] " n.pettik
     [not found]   ` <95f6ed87-03fb-c0ad-76e1-3776a0714e8b@tarantool.org>
2018-06-01 11:50     ` n.pettik [this message]
2018-06-01 12:16       ` Alex Khatskevich
2018-06-19 14:55         ` n.pettik

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=492561F3-E9AF-4CBB-AC84-811F31BBBD0D@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=avkhatskevich@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH] Fix ephemeral table next rowid generation' \
    /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