Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES plugins: Specifying types in bulk requests is deprecated. #2240

Closed
17 tasks
abitmore opened this issue Aug 22, 2020 · 7 comments · Fixed by #1997
Closed
17 tasks

ES plugins: Specifying types in bulk requests is deprecated. #2240

abitmore opened this issue Aug 22, 2020 · 7 comments · Fixed by #1997

Comments

@abitmore
Copy link
Member

abitmore commented Aug 22, 2020

User Story

Found in elasticsearch_deprecation.log:

[types removal] Specifying types in bulk requests is deprecated.

More info: https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html

#1997 was an attempt to fix this issue.

Impacts
Describe which portion(s) of BitShares Core may be impacted by your request. Please tick at least one box.

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Travis, etc.)
  • DEX (the Decentralized EXchange, market engine, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Other (please add below)

CORE TEAM TASK LIST

  • Evaluate / Prioritize Feature Request
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation
@abitmore abitmore added this to the Future Feature Release milestone Aug 22, 2020
@abitmore abitmore added this to New -Awaiting Core Team Evaluation in Project Backlog via automation Aug 22, 2020
@abitmore
Copy link
Member Author

#1997 was an attempt to fix this issue.

@abitmore abitmore added this to To do in Feature Release (5.2.0) via automation Jan 22, 2021
@abitmore abitmore removed this from New -Awaiting Core Team Evaluation in Project Backlog Jan 22, 2021
@abitmore abitmore added this to To do in Feature Release (6.1.0) via automation Apr 13, 2021
@abitmore abitmore removed this from To do in Feature Release (5.2.0) Apr 13, 2021
@abitmore abitmore self-assigned this Dec 18, 2021
@abitmore abitmore moved this from To do to In progress in Feature Release (6.1.0) Dec 18, 2021
@abitmore
Copy link
Member Author

This is more complicated than I thought.

The changes are:

  • In ES 6.x the type field was needed.
  • In ES 7.x (current version) the type field is deprecated, but it is still accepted, with the warning.
  • In ES 8.x we will be no longer able to specify a type.

So sooner or later we need to stop specifying types.

Although it is easy to fix the plugin in bitshares-core, the real trouble lies in service maintenance and client application compatibility.

Currently in ES, we use the path pattern bitshares-*/data/2.9.x, where data is the type. If we stop specifying the type, the path pattern will become bitshares-*/_doc/2.9.x. Of course, the existing data will not change by itself.

  • ES service maintainers will need to manually delete all existing indexes from their ES databases and regenerate all data with new code, or use a new prefix other than the default one (bitshares-), or install a new ES database. This may take days or weeks to complete. If the old data is not deleted, it uses around 500G of disk space.
    By the way, we will need more disk space to store the new data due to Save operation_result and proposed_ops as objects in ElasticSearch plugin #2380.
  • Client libraries and applications will need to query data through the new path pattern and, if applicable, a new prefix.

A side benefit of not specifying a type is that it allows us to customize data mapping, which is required to store arrays using the nested data type. Arrays are stored using the object data type now, which has led to some inconveniences. More info: https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html

@sschiessl-bcp @ety001 what do you think? If it's OK, I can make this change in the next feature release (6.1.0).

@sschiessl-bcp
Copy link

ElasticSearch has a license change after 7 (https://techgenix.com/elasticsearchs-licensing-change/), offspring of that is OpenSearch by Amazon:

Are they following the change of type?

@ety001
Copy link

ety001 commented Dec 19, 2021

I prefer to regenerate all data with new path pattern. Keeping old data is not a good way for developing.

@abitmore
Copy link
Member Author

@sschiessl-bcp according to their blog about license change (https://www.elastic.co/blog/licensing-change) I think we can still use it as is, because we are using the software by our own, but not selling it as a service.

@abitmore
Copy link
Member Author

@lebinbit I guess your applications would be impacted by the change. Please take a look.

@abitmore abitmore linked a pull request Dec 21, 2021 that will close this issue
@abitmore
Copy link
Member Author

Fixed by #1997.

Feature Release (6.1.0) automation moved this from In progress to Done Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants