# Sequence Numbers for Replica Recovery

**URL:** <https://discuss.elastic.co/t/sequence-numbers-for-replica-recovery/17754>\
**Category:** Elasticsearch\
**Created:** [May 27, 2014, 2:36pm UTC](https://discuss.elastic.co/t/sequence-numbers-for-replica-recovery/17754 "2014-05-27T14:36:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![crimondi](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@crimondi](https://discuss.elastic.co/u/crimondi)\
**Post date:** [May 27, 2014, 2:36pm UTC](https://discuss.elastic.co/t/sequence-numbers-for-replica-recovery/17754/1 "2014-05-27T14:36:55Z")

</div>

In a blog post last  
month, [http://www.elasticsearch.org/blog/resiliency-elasticsearch/](http://www.elasticsearch.org/blog/resiliency-elasticsearch/), Shay  
pointed out that with Lucene 4.8 Elasticsearch will start using sequence  
numbers for operations on priimary shards. This will speed up recovery so  
only data that has changed need be copied on recovery. It is unclear to me  
reading the 1.2 release notes whether that has been implemented or if so  
where it is on the roadmap. Any more information on this?

Thanks,

Chris

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6f8dfcd9-7258-4f1b-a33a-efe72358daa3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6f8dfcd9-7258-4f1b-a33a-efe72358daa3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [May 28, 2014, 5:01am UTC](https://discuss.elastic.co/t/sequence-numbers-for-replica-recovery/17754/2 "2014-05-28T05:01:45Z")

</div>

My understanding is that Lucene now provides checksums, but that sequence  
numbers is a functionality built into Elasticsearch.

I do not think that functionality has been released with 1.2, but I could  
be wrong. The item below it, zen discovery, is definitely not part of 1.2

--  
Ivan

On Tue, May 27, 2014 at 7:36 AM, Chris Rimondi [chris.rimondi@gmail.com](mailto:chris.rimondi@gmail.com)wrote:

> In a blog post last month,  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/resiliency-elasticsearch/), Shay pointed  
> out that with Lucene 4.8 Elasticsearch will start using sequence numbers  
> for operations on priimary shards. This will speed up recovery so only data  
> that has changed need be copied on recovery. It is unclear to me reading  
> the 1.2 release notes whether that has been implemented or if so where it  
> is on the roadmap. Any more information on this?
> 
> Thanks,
> 
> Chris
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/6f8dfcd9-7258-4f1b-a33a-efe72358daa3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6f8dfcd9-7258-4f1b-a33a-efe72358daa3%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/6f8dfcd9-7258-4f1b-a33a-efe72358daa3%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6f8dfcd9-7258-4f1b-a33a-efe72358daa3%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC4S1Z1gp-ECBtMLkgtdUEyAK9noVFxvFNH0\_SGooqRZQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC4S1Z1gp-ECBtMLkgtdUEyAK9noVFxvFNH0_SGooqRZQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [May 28, 2014, 6:19am UTC](https://discuss.elastic.co/t/sequence-numbers-for-replica-recovery/17754/3 "2014-05-28T06:19:15Z")

</div>

I'm not sure if this is related but there is work on designing sequence  
numbers that are decentralized time based UUIDs. If they were assigned to  
Lucene segments, shards could declare what segments they already have, when  
a recovery process runs. Feature is planned for 1.3

> <https://github.com/elastic/elasticsearch/issues/5941>
>
> Today we use UUIDs which are very costly to compute since they use \`SecureRandom…\` and they have some properties that might not play very well / or as well as they could with the Lucene internal datastructures since they don't share a common prefix. With a time based ID we can potentially remove the need for bloom fitlers on the ID fields since the shared prefixes across the IDs might be all in memory and that would speedup updates dramatically. Something along the lines of \[flake ids\](http://boundary.com/blog/2012/01/12/flake-a-decentralized-k-ordered-unique-id-generator-in-erlang/) would be very interesting since it has this property

Jörg

On Wed, May 28, 2014 at 7:01 AM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> My understanding is that Lucene now provides checksums, but that sequence  
> numbers is a functionality built into Elasticsearch.
> 
> I do not think that functionality has been released with 1.2, but I could  
> be wrong. The item below it, zen discovery, is definitely not part of 1.2
> 
> --  
> Ivan
> 
> On Tue, May 27, 2014 at 7:36 AM, Chris Rimondi [chris.rimondi@gmail.com](mailto:chris.rimondi@gmail.com)wrote:
> 
> > In a blog post last month,  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/resiliency-elasticsearch/), Shay  
> > pointed out that with Lucene 4.8 Elasticsearch will start using sequence  
> > numbers for operations on priimary shards. This will speed up recovery so  
> > only data that has changed need be copied on recovery. It is unclear to me  
> > reading the 1.2 release notes whether that has been implemented or if so  
> > where it is on the roadmap. Any more information on this?
> > 
> > Thanks,
> > 
> > Chris
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/6f8dfcd9-7258-4f1b-a33a-efe72358daa3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6f8dfcd9-7258-4f1b-a33a-efe72358daa3%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/6f8dfcd9-7258-4f1b-a33a-efe72358daa3%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6f8dfcd9-7258-4f1b-a33a-efe72358daa3%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC4S1Z1gp-ECBtMLkgtdUEyAK9noVFxvFNH0\_SGooqRZQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC4S1Z1gp-ECBtMLkgtdUEyAK9noVFxvFNH0_SGooqRZQ%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC4S1Z1gp-ECBtMLkgtdUEyAK9noVFxvFNH0\_SGooqRZQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC4S1Z1gp-ECBtMLkgtdUEyAK9noVFxvFNH0_SGooqRZQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEsm3cTs4dqREKVCv-KT246m1U%2BSbo\_aQhoVfbUEV8CBw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEsm3cTs4dqREKVCv-KT246m1U%2BSbo_aQhoVfbUEV8CBw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:26am UTC](https://discuss.elastic.co/t/sequence-numbers-for-replica-recovery/17754/4 "2017-07-06T01:26:29Z")

</div>


