Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: kostja@tarantool.org
Cc: tarantool-patches@freelists.org
Subject: Re: [PATCH v2 4/5] vinyl: do not use index lsn to identify indexes in vylog
Date: Thu, 22 Mar 2018 18:08:35 +0300	[thread overview]
Message-ID: <20180322150835.tkn2twkxu2mghkj6@esperanza> (raw)
In-Reply-To: <3bb507af569820382ddf2cce1e776e9d13f1ec91.1521545062.git.vdavydov.dev@gmail.com>

On Tue, Mar 20, 2018 at 02:29:04PM +0300, Vladimir Davydov wrote:
> diff --git a/src/box/vy_log.c b/src/box/vy_log.c
> index a6f03a55..9c8dd631 100644
> --- a/src/box/vy_log.c
> +++ b/src/box/vy_log.c
> @@ -2013,7 +2048,7 @@ vy_log_append_index(struct xlog *xlog, struct vy_index_recovery_info *index)
>  
>  	vy_log_record_init(&record);
>  	record.type = VY_LOG_CREATE_INDEX;
> -	record.index_lsn = index->index_lsn;
> +	record.index_id = index->id;
>  	record.index_def_id = index->index_id;
>  	record.space_def_id = index->space_id;
>  	record.key_parts = index->key_parts;

Missed setting record.commit_lsn here - fixed on branch:

diff --git a/src/box/vy_log.c b/src/box/vy_log.c
index 0a5dd26e..ea4b902d 100644
--- a/src/box/vy_log.c
+++ b/src/box/vy_log.c
@@ -2012,6 +2012,7 @@ vy_log_append_index(struct xlog *xlog, struct vy_index_recovery_info *index)
 	record.space_def_id = index->space_id;
 	record.key_parts = index->key_parts;
 	record.key_part_count = index->key_part_count;
+	record.commit_lsn = index->commit_lsn;
 	if (vy_log_append_record(xlog, &record) != 0)
 		return -1;
 
diff --git a/test/vinyl/layout.result b/test/vinyl/layout.result
index f1f52b9f..8878cb5e 100644
--- a/test/vinyl/layout.result
+++ b/test/vinyl/layout.result
@@ -128,7 +128,8 @@ result
     - - HEADER:
           type: INSERT
         BODY:
-          tuple: [0, {7: [{'field': 0, 'collation': 1, 'type': 'string'}], 6: 512}]
+          tuple: [0, {7: [{'field': 0, 'collation': 1, 'type': 'string'}], 12: 3,
+              6: 512}]
       - HEADER:
           type: INSERT
         BODY:
@@ -156,7 +157,8 @@ result
       - HEADER:
           type: INSERT
         BODY:
-          tuple: [0, {0: 2, 5: 1, 6: 512, 7: [{'field': 1, 'is_nullable': true, 'type': 'unsigned'}]}]
+          tuple: [0, {0: 2, 5: 1, 6: 512, 7: [{'field': 1, 'is_nullable': true, 'type': 'unsigned'}],
+              12: 4}]
       - HEADER:
           type: INSERT
         BODY:

  reply	other threads:[~2018-03-22 15:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-20 11:29 [PATCH v2 0/5] Prepare vylog for space alter Vladimir Davydov
2018-03-20 11:29 ` [PATCH v2 1/5] vinyl: refactor vylog recovery Vladimir Davydov
2018-03-20 11:29 ` [PATCH v2 2/5] vinyl: rename vy_index::id to index_id Vladimir Davydov
2018-03-20 11:29 ` [PATCH v2 3/5] vinyl: rename vy_log_record::index_id/space_id to index_def_id/space_def_id Vladimir Davydov
2018-03-20 11:29 ` [PATCH v2 4/5] vinyl: do not use index lsn to identify indexes in vylog Vladimir Davydov
2018-03-22 15:08   ` Vladimir Davydov [this message]
2018-03-20 11:29 ` [PATCH v2 5/5] alter: rewrite space truncation using alter infrastructure Vladimir Davydov

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=20180322150835.tkn2twkxu2mghkj6@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH v2 4/5] vinyl: do not use index lsn to identify indexes in vylog' \
    /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