vermiculus / sx.el

Stack Exchange for Emacs
http://stackapps.com/q/3950
709 stars 40 forks source link

Unable to see answers to a question due to markdown args out of range error #315

Open dakrone opened 8 years ago

dakrone commented 8 years ago

When I open a sx question, I get the following error:

markdown-find-previous-prop: Args out of range: 279, 279

Here's a backtrace:

Debugger entered--Lisp error: (args-out-of-range 263 263)
  get-text-property(263 markdown-tilde-fence-begin)
  markdown-find-previous-prop(markdown-tilde-fence-begin)
  mapcar(markdown-find-previous-prop (markdown-tilde-fence-begin markdown-yaml-metadata-begin markdown-gfm-block-begin))
  cl-mapcar(markdown-find-previous-prop (markdown-tilde-fence-begin markdown-yaml-metadata-begin markdown-gfm-block-begin))
  markdown-find-previous-block()
  markdown-syntax-propertize-fenced-block-constructs(264 1925)
  markdown-syntax-propertize(264 1925)
  sx-question-mode--skip-and-fontify-pre()
  sx-question-mode--dont-fill-here()
  sx-question-mode--process-markdown-in-region(264 1925)
  sx-question-mode--insert-markdown("I have this scenario where a system generates an index every day inside a node. Each index has 1 primary shard.\n\nSo, all the documents indexed in a day goes to a certain index, and after the day passed, a new index is created.\n\nI keep the indices of the last 60 days (so this means that I always have 60 shards in the node). I can't close the old indices because I want them to support searches. After the 60th day passed then I delete them.\n\nAs I was reading the following [article][1] I noticed this about the index buffer:\n\n> It defaults to 10%, meaning that 10% of the total memory allocated to a node will be used as the indexing buffer size. This amount is then divided between all the different shards\n\nThis means that for the index of the day I have 10% / 60 of buffer index memory. So I am not really using the 10%.\n\nThe question is, what happens if I [set to read only the older indices:][2]\n\n> index.blocks.read_only\nSet to true to make the index and index metadata read only, false to allow writes and metadata changes.\n\nWill I see a benefit for doing this? Like having the entire 10% of index buffer in my only writable index? Or an improve in the searches of the other indices since they can be merged in an only segmented as they do not longer recieves writes?\n\nThanks!\n\nPablo\n\n  [1]: https://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-indices.html#buffer\n  [2]: https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-update-settings.html\n\nPD: Im using ElasticSearch 1.7.3 but Im looking forward to migrate to 2.2 in a future. I would like to know, if possible, if I have a benefit if this would be translated to 2.2")
  sx-question-mode--print-section(((tags "performance" "indexing" "elasticsearch" "buffer") (site_par . "stackoverflow") (answers ((owner (reputation . 2883) (user_id . 18201) (user_type . "registered") (accept_rate . 75) (profile_image . "https://www.gravatar.com/avatar/bcacd00a7f05c4772329cf9f446c7987?s=128&d=identicon&r=PG") (display_name . "Lee H") (link . "http://stackoverflow.com/users/18201/lee-h")) (downvoted) (upvoted) (is_accepted) (score . 0) (last_activity_date . 1456179083) (creation_date . 1456179083) (answer_id . 35564958) (question_id . 35562925) (share_link . "http://stackoverflow.com/a/35564958/18201") (body_markdown . "No, you won't get a benefit from adding the read_only block. The only way you would free up the buffer is to close the index entirely.\n\nAlso, you may be interested to know about https://github.com/elastic/elasticsearch/pull/14121 which gives \"actively indexing\" shards a bigger share of the buffer. Coming in Elasticsearch 5.0.") (link . "http://stackoverflow.com/questions/35562925/elasticsearch-setting-readonly-to-an-index-improves-performance/35564958#35564958"))) (owner (reputation . 36) (user_id . 2606883) (user_type . "registered") (accept_rate . 100) (profile_image . "https://www.gravatar.com/avatar/31271792a1221739ef20f7d8e5f76726?s=128&d=identicon&r=PG") (display_name . "More92") (link . "http://stackoverflow.com/users/2606883/more92")) (downvoted) (upvoted) (is_answered) (view_count . 7) (answer_count . 1) (score . 1) (last_activity_date . 1456179083) (creation_date . 1456172038) (question_id . 35562925) (share_link . "http://stackoverflow.com/q/35562925/18201") (body_markdown . "I have this scenario where a system generates an index every day inside a node. Each index has 1 primary shard.\n\nSo, all the documents indexed in a day goes to a certain index, and after the day passed, a new index is created.\n\nI keep the indices of the last 60 days (so this means that I always have 60 shards in the node). I can't close the old indices because I want them to support searches. After the 60th day passed then I delete them.\n\nAs I was reading the following [article][1] I noticed this about the index buffer:\n\n> It defaults to 10%, meaning that 10% of the total memory allocated to a node will be used as the indexing buffer size. This amount is then divided between all the different shards\n\nThis means that for the index of the day I have 10% / 60 of buffer index memory. So I am not really using the 10%.\n\nThe question is, what happens if I [set to read only the older indices:][2]\n\n> index.blocks.read_only\nSet to true to make the index and index metadata read only, false to allow writes and metadata changes.\n\nWill I see a benefit for doing this? Like having the entire 10% of index buffer in my only writable index? Or an improve in the searches of the other indices since they can be merged in an only segmented as they do not longer recieves writes?\n\nThanks!\n\nPablo\n\n  [1]: https://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-indices.html#buffer\n  [2]: https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-update-settings.html\n\nPD: Im using ElasticSearch 1.7.3 but Im looking forward to migrate to 2.2 in a future. I would like to know, if possible, if I have a benefit if this would be translated to 2.2") (link . "http://stackoverflow.com/questions/35562925/elasticsearch-setting-readonly-to-an-index-improves-performance") (title . "ElasticSearch - Setting readonly to an index improves performance?")))
  sx-question-mode--print-question(((tags "performance" "indexing" "elasticsearch" "buffer") (site_par . "stackoverflow") (answers ((owner (reputation . 2883) (user_id . 18201) (user_type . "registered") (accept_rate . 75) (profile_image . "https://www.gravatar.com/avatar/bcacd00a7f05c4772329cf9f446c7987?s=128&d=identicon&r=PG") (display_name . "Lee H") (link . "http://stackoverflow.com/users/18201/lee-h")) (downvoted) (upvoted) (is_accepted) (score . 0) (last_activity_date . 1456179083) (creation_date . 1456179083) (answer_id . 35564958) (question_id . 35562925) (share_link . "http://stackoverflow.com/a/35564958/18201") (body_markdown . "No, you won't get a benefit from adding the read_only block. The only way you would free up the buffer is to close the index entirely.\n\nAlso, you may be interested to know about https://github.com/elastic/elasticsearch/pull/14121 which gives \"actively indexing\" shards a bigger share of the buffer. Coming in Elasticsearch 5.0.") (link . "http://stackoverflow.com/questions/35562925/elasticsearch-setting-readonly-to-an-index-improves-performance/35564958#35564958"))) (owner (reputation . 36) (user_id . 2606883) (user_type . "registered") (accept_rate . 100) (profile_image . "https://www.gravatar.com/avatar/31271792a1221739ef20f7d8e5f76726?s=128&d=identicon&r=PG") (display_name . "More92") (link . "http://stackoverflow.com/users/2606883/more92")) (downvoted) (upvoted) (is_answered) (view_count . 7) (answer_count . 1) (score . 1) (last_activity_date . 1456179083) (creation_date . 1456172038) (question_id . 35562925) (share_link . "http://stackoverflow.com/q/35562925/18201") (body_markdown . "I have this scenario where a system generates an index every day inside a node. Each index has 1 primary shard.\n\nSo, all the documents indexed in a day goes to a certain index, and after the day passed, a new index is created.\n\nI keep the indices of the last 60 days (so this means that I always have 60 shards in the node). I can't close the old indices because I want them to support searches. After the 60th day passed then I delete them.\n\nAs I was reading the following [article][1] I noticed this about the index buffer:\n\n> It defaults to 10%, meaning that 10% of the total memory allocated to a node will be used as the indexing buffer size. This amount is then divided between all the different shards\n\nThis means that for the index of the day I have 10% / 60 of buffer index memory. So I am not really using the 10%.\n\nThe question is, what happens if I [set to read only the older indices:][2]\n\n> index.blocks.read_only\nSet to true to make the index and index metadata read only, false to allow writes and metadata changes.\n\nWill I see a benefit for doing this? Like having the entire 10% of index buffer in my only writable index? Or an improve in the searches of the other indices since they can be merged in an only segmented as they do not longer recieves writes?\n\nThanks!\n\nPablo\n\n  [1]: https://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-indices.html#buffer\n  [2]: https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-update-settings.html\n\nPD: Im using ElasticSearch 1.7.3 but Im looking forward to migrate to 2.2 in a future. I would like to know, if possible, if I have a benefit if this would be translated to 2.2") (link . "http://stackoverflow.com/questions/35562925/elasticsearch-setting-readonly-to-an-index-improves-performance") (title . "ElasticSearch - Setting readonly to an index improves performance?")))
  sx-question-mode--erase-and-print-question(((tags "performance" "indexing" "elasticsearch" "buffer") (site_par . "stackoverflow") (answers ((owner (reputation . 2883) (user_id . 18201) (user_type . "registered") (accept_rate . 75) (profile_image . "https://www.gravatar.com/avatar/bcacd00a7f05c4772329cf9f446c7987?s=128&d=identicon&r=PG") (display_name . "Lee H") (link . "http://stackoverflow.com/users/18201/lee-h")) (downvoted) (upvoted) (is_accepted) (score . 0) (last_activity_date . 1456179083) (creation_date . 1456179083) (answer_id . 35564958) (question_id . 35562925) (share_link . "http://stackoverflow.com/a/35564958/18201") (body_markdown . "No, you won't get a benefit from adding the read_only block. The only way you would free up the buffer is to close the index entirely.\n\nAlso, you may be interested to know about https://github.com/elastic/elasticsearch/pull/14121 which gives \"actively indexing\" shards a bigger share of the buffer. Coming in Elasticsearch 5.0.") (link . "http://stackoverflow.com/questions/35562925/elasticsearch-setting-readonly-to-an-index-improves-performance/35564958#35564958"))) (owner (reputation . 36) (user_id . 2606883) (user_type . "registered") (accept_rate . 100) (profile_image . "https://www.gravatar.com/avatar/31271792a1221739ef20f7d8e5f76726?s=128&d=identicon&r=PG") (display_name . "More92") (link . "http://stackoverflow.com/users/2606883/more92")) (downvoted) (upvoted) (is_answered) (view_count . 7) (answer_count . 1) (score . 1) (last_activity_date . 1456179083) (creation_date . 1456172038) (question_id . 35562925) (share_link . "http://stackoverflow.com/q/35562925/18201") (body_markdown . "I have this scenario where a system generates an index every day inside a node. Each index has 1 primary shard.\n\nSo, all the documents indexed in a day goes to a certain index, and after the day passed, a new index is created.\n\nI keep the indices of the last 60 days (so this means that I always have 60 shards in the node). I can't close the old indices because I want them to support searches. After the 60th day passed then I delete them.\n\nAs I was reading the following [article][1] I noticed this about the index buffer:\n\n> It defaults to 10%, meaning that 10% of the total memory allocated to a node will be used as the indexing buffer size. This amount is then divided between all the different shards\n\nThis means that for the index of the day I have 10% / 60 of buffer index memory. So I am not really using the 10%.\n\nThe question is, what happens if I [set to read only the older indices:][2]\n\n> index.blocks.read_only\nSet to true to make the index and index metadata read only, false to allow writes and metadata changes.\n\nWill I see a benefit for doing this? Like having the entire 10% of index buffer in my only writable index? Or an improve in the searches of the other indices since they can be merged in an only segmented as they do not longer recieves writes?\n\nThanks!\n\nPablo\n\n  [1]: https://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-indices.html#buffer\n  [2]: https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-update-settings.html\n\nPD: Im using ElasticSearch 1.7.3 but Im looking forward to migrate to 2.2 in a future. I would like to know, if possible, if I have a benefit if this would be translated to 2.2") (link . "http://stackoverflow.com/questions/35562925/elasticsearch-setting-readonly-to-an-index-improves-performance") (title . "ElasticSearch - Setting readonly to an index improves performance?")))
  sx-question-mode--display(((tags "performance" "indexing" "elasticsearch" "buffer") (site_par . "stackoverflow") (answers ((owner (reputation . 2883) (user_id . 18201) (user_type . "registered") (accept_rate . 75) (profile_image . "https://www.gravatar.com/avatar/bcacd00a7f05c4772329cf9f446c7987?s=128&d=identicon&r=PG") (display_name . "Lee H") (link . "http://stackoverflow.com/users/18201/lee-h")) (downvoted) (upvoted) (is_accepted) (score . 0) (last_activity_date . 1456179083) (creation_date . 1456179083) (answer_id . 35564958) (question_id . 35562925) (share_link . "http://stackoverflow.com/a/35564958/18201") (body_markdown . "No, you won't get a benefit from adding the read_only block. The only way you would free up the buffer is to close the index entirely.\n\nAlso, you may be interested to know about https://github.com/elastic/elasticsearch/pull/14121 which gives \"actively indexing\" shards a bigger share of the buffer. Coming in Elasticsearch 5.0.") (link . "http://stackoverflow.com/questions/35562925/elasticsearch-setting-readonly-to-an-index-improves-performance/35564958#35564958"))) (owner (reputation . 36) (user_id . 2606883) (user_type . "registered") (accept_rate . 100) (profile_image . "https://www.gravatar.com/avatar/31271792a1221739ef20f7d8e5f76726?s=128&d=identicon&r=PG") (display_name . "More92") (link . "http://stackoverflow.com/users/2606883/more92")) (downvoted) (upvoted) (is_answered) (view_count . 7) (answer_count . 1) (score . 1) (last_activity_date . 1456179083) (creation_date . 1456172038) (question_id . 35562925) (share_link . "http://stackoverflow.com/q/35562925/18201") (body_markdown . "I have this scenario where a system generates an index every day inside a node. Each index has 1 primary shard.\n\nSo, all the documents indexed in a day goes to a certain index, and after the day passed, a new index is created.\n\nI keep the indices of the last 60 days (so this means that I always have 60 shards in the node). I can't close the old indices because I want them to support searches. After the 60th day passed then I delete them.\n\nAs I was reading the following [article][1] I noticed this about the index buffer:\n\n> It defaults to 10%, meaning that 10% of the total memory allocated to a node will be used as the indexing buffer size. This amount is then divided between all the different shards\n\nThis means that for the index of the day I have 10% / 60 of buffer index memory. So I am not really using the 10%.\n\nThe question is, what happens if I [set to read only the older indices:][2]\n\n> index.blocks.read_only\nSet to true to make the index and index metadata read only, false to allow writes and metadata changes.\n\nWill I see a benefit for doing this? Like having the entire 10% of index buffer in my only writable index? Or an improve in the searches of the other indices since they can be merged in an only segmented as they do not longer recieves writes?\n\nThanks!\n\nPablo\n\n  [1]: https://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-indices.html#buffer\n  [2]: https://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-update-settings.html\n\nPD: Im using ElasticSearch 1.7.3 but Im looking forward to migrate to 2.2 in a future. I would like to know, if possible, if I have a benefit if this would be translated to 2.2") (link . "http://stackoverflow.com/questions/35562925/elasticsearch-setting-readonly-to-an-index-improves-performance") (title . "ElasticSearch - Setting readonly to an index improves performance?")) #<window 54 on *Backtrace*>)
  sx-question-list-view-next(1)
  funcall-interactively(sx-question-list-view-next 1)
  call-interactively(sx-question-list-view-next nil nil)
  command-execute(sx-question-list-view-next)
ryjm commented 8 years ago

fbdfff2 added a markdown propertizer that seem to no longer be needed - from a cursory glance, markdown-mode.el did a major refactor of their matching block constructs code: https://github.com/defunkt/markdown-mode/commit/e72bd3fb98f45ca3e4d26c9cd72436a18243d1c2

I removed that propertizer and I can see the answers and they look fine to me... but I'm not sure what the formatting is supposed to look like since I was getting this error as well.

EDIT: Oops, that just means you won't get rendered markdown. Well, at least we know where the problem is now. It's not too bad without markdown if you need a quick fix.