Coder Social home page Coder Social logo

[BUG] Inconsistent behavior on POST _aliases when two opposing actions are operating on the same index/alias pair about opensearch HOT 2 OPEN

theahura avatar theahura commented on June 28, 2024
[BUG] Inconsistent behavior on POST _aliases when two opposing actions are operating on the same index/alias pair

from opensearch.

Comments (2)

theahura avatar theahura commented on June 28, 2024

To be more explicit, I got logs from my own system. Here are the actions:

Making the following alias modifications: [
  {
    remove: { index: 'indexedinstance', alias: 'current-published-instance' }
  },
  {
    add: {
      index: 'indexedinstance',
      alias: 'current-published-instance',
      filter: undefined,
      is_write_index: true
    }
  }
]

and then when I run

 30   // Get the mappings.                                                           
 31   const mappings = await client.cat.aliases();                                   
 32   console.log(JSON.stringify(mappings, null, 2));  

I get

{                                                                                                                                                                                      
 "body": "",                                                                                                                                                                          
 "statusCode": 200,                         
 "headers": {                               
   "content-type": "text/plain; charset=UTF-8",                                           
   "content-length": "0",                   
   "x-envoy-upstream-service-time": "17",                                                 
   "date": "Sat, 22 Jun 2024 03:05:22 GMT",                                               
   "server": "aoss-amazon-m",                                                             
   "x-request-id": "865cd86d-77ce-9a30-a215-3fbbc77d49d2"                                 
 },                                         
 "meta": {                                  
   "context": null,                         
   "request": {                             
     "params": {                            
       "method": "GET",                     
       "path": "/_cat/aliases",             
       "body": null,                        
       "querystring": "",                   
       "headers": {                         
         "user-agent": "opensearch-js/2.3.1 (linux 5.15.0-1041-aws-x64; Node.js v17.9.1)"
       },                                                                                 
       "timeout": 30000                     
     },                                     
     "options": {},                         
     "id": 1                                
   },                                       
   "name": "opensearch-js",                 
...

from opensearch.

dblock avatar dblock commented on June 28, 2024

Looks like a bug. @theahura Want to try and write a YAML REST test for it?
https://github.com/opensearch-project/OpenSearch/blob/main/TESTING.md#testing-the-rest-layer

from opensearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.