Live data from Hacker News

Postmortem: Outage due to Elasticsearch’s flexibility and our carelessness

lambda.grofers.com

21–29 of 29 posts

Re: Postmortem: Outage due to Elasticsearch’s flexibility and our carelessness

#21
post #17

Earlier quoted context omitted.

I might be missing something. But to my understanding I think it is correct. I didn't quite get what you exactly mean by that? Educate me please. To explain myself, I meant that tests that were succeeding previously would have failed due to this issue if we had tests written for it. Does my statement not convey this?

Original statement: > But lack of automated regression testing would have caught this issue. Your question: > To explain myself, I meant that tests that were succeeding previously would have failed due to this issue if we had tests written for it. Does my statement not convey this? No. The sentence says that the lack (i.e. not having) tests would have caught the issue. If you remove 'But lack of', the sentence makes…

Impatience at times is root of so many things going wrong. The thing I read again and again and again and failed to see.

Thanks :)

Re: Postmortem: Outage due to Elasticsearch’s flexibility and our carelessness

#23
post #14

> The values for field price in products mapping and the values for field price in promotions mapping (in the same index) will essentially be added to the same list at Lucene Segment level. And it will not fail or throw an exception. Probably a stupid question but why can't ElasticSearch translate both mappings into something like, "products_price", and "promotions_price" before adding to the 'list'?

Something I wondered too. But I think in the 2.x versions, they are already planning something around it. Honestly, I have not looked at it much yet but even creating another mapping with the same field name but different type should perhaps throw a warning or not be allowed unless overridden as they lead to things like these.

In 2.x, all fields must adhere to the same data type or you will get a failure [1]. To quote:

  Fields with the same name, in the same index, in different types,
  must have the same mapping
So hopefully this isn't an issue anymore! I do strongly suggest (and we've done this from the beginning) that no one rely on elasticsearch's auto mapping and that you should explicitly map your fields.

[1] -- https://www.elastic.co/guide/en/elasticsearch/reference/curr...

Re: Postmortem: Outage due to Elasticsearch’s flexibility and our carelessness

#24

Excellent write up! Would configuring ES to alert instead of silently default type on new fields have helped ? "dynamic": "strict" https://www.elastic.co/guide/en/elasticsearch/guide/current/...

Yes it would have. But as I said in one of the other comments, they are doing something about this in 2.x releases. And this reference is from 2.x release's documentation.

Wish we had it back then. We are currently on 1.4.

Re: Postmortem: Outage due to Elasticsearch’s flexibility and our carelessness

#25
post #14

Earlier quoted context omitted.

Something I wondered too. But I think in the 2.x versions, they are already planning something around it. Honestly, I have not looked at it much yet but even creating another mapping with the same field name but different type should perhaps throw a warning or not be allowed unless overridden as they lead to things like these.

In 2.x, all fields must adhere to the same data type or you will get a failure [1]. To quote: Fields with the same name, in the same index, in different types, must have the same mapping So hopefully this isn't an issue anymore! I do strongly suggest (and we've done this from the beginning) that no one rely on elasticsearch's auto mapping and that you should explicitly map your fields. [1] -- https://www.elastic.co/g…

Yes you are right. In fact, a simple work around, before Elasticsearch coming out with this feature in their 2.x releases, was to review mappings and what goes in Elasticsearch. And we got careless about that and shot ourselves in the foot. We learned it the hard way.

Re: Postmortem: Outage due to Elasticsearch’s flexibility and our carelessness

#27

You've got what appears to be a vestigial comment in your article. It reads: (add more details here) But it looks like you've got plenty of details. Just thought I'd let you know ;-)

Precisely why you need review processes ;)

Re: Postmortem: Outage due to Elasticsearch’s flexibility and our carelessness

#28
post #24

Excellent write up! Would configuring ES to alert instead of silently default type on new fields have helped ? "dynamic": "strict" https://www.elastic.co/guide/en/elasticsearch/guide/current/...

Yes it would have. But as I said in one of the other comments, they are doing something about this in 2.x releases. And this reference is from 2.x release's documentation. Wish we had it back then. We are currently on 1.4.

Got it. Thanks again for the write up and the time taken to respond to all comments!!
Post reply on HN