cofacts / rumors-api

GraphQL API server for clients like rumors-site and rumors-line-bot
https://api.cofacts.tw
MIT License
109 stars 26 forks source link

ctx userId should be dbUserId #233

Closed ztsai closed 3 years ago

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.06%) to 86.003% when pulling d09fdf58809aabe60a5f86155b1c88ed3c43581b on ctxUserId into 2c0769ea2273fe96efee24006607e8f9bf934b95 on master.

MrOrz commented 3 years ago

The fix is tested on staging and deployed to production.

After the fix is enrolled, the following query yields 1804 results:

curl -XPOST "http://172.18.0.3:9200/_all/_search?pretty=true" -H 'Content-Type: application/json' -d'
{
  "query": {
    "regexp": {
      "userId": {
        "value": "U.{32}"
      }
    }
  }
}'

Let's observe if the number stopps increasing after the fix.

MrOrz commented 3 years ago

Update: The number of documents w/ U.{32} userId stops at 1,804, so the API patch is successful 🎉

The indexes that needs to be migrated:

No documents in other index need migration.