Skip to content

Onboarding trait save fails because ES consistency in member api #39

@vikasrohit

Description

@vikasrohit

There is existing issue with member api and its ES indexing which causes the trait data to not reach to the ES index many times. And when this happens, primary database (DynamoDB) and ES have different states of the same data which causes troubles in further updating the traits for that particular user. Here is what happens:

  • User or onboarding processor adds some trait for the first times e.g. adding the education for the first time
  • Due to unknown reason in member api, it saves it to the dynamodb but not to the ES index (most recent issue for this is logged here but this is consistently there since the member api started supporting traits.
  • Now, when user or our onboarding, fetches the trait, it does not receive it from the GET endpoint and hence it tries to make a POST call instead of PUT or PATCH.
  • member api internally looks at the primary source of truth (dynamodb) to verify if the requested trait exists or not and it founds it in the DB
  • now the member api errors out because caller is not allowed to make a POST call when the trait already exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions