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

New trait is not being saved for a user for whom there is no trait yet #53

Open
vikasrohit opened this issue Oct 1, 2021 · 7 comments

Comments

@vikasrohit
Copy link

If for a user/member the response of endpoint /v5/members/vikasrohit11/traits is [] then if we try to create a new trait for such user using POST /v5/members/vikasrohit11/traits endpoint, does not create trait (at least we can not see in GET /v5/members/vikasrohit11/traits) and there is no error log in member-api or member-processor-es both.

@xxcxy
Copy link

xxcxy commented Oct 1, 2021

  1. I tried POST /v5/members/vikasrohit11/traits and it add db, post message success. I checked the db and found the new record. So i suspect the es-processor don't insert data into es, maybe it is just in a wrong branch like shapeup4-cqrs-standards-update.
  2. I used the feature/shapeup4-cqrs-standards-update which will insert into es by itself to test this issue, and it can get trait correctly.

@vikasrohit
Copy link
Author

Thanks for debugging @xxcxy Here is what we have as of now:
We are getting the traits saved properly for a user for whom we already have at least one trait in production. And we are not getting the trait back in GET endpoint when the user does not have any trait returned by GET endpoint (before creating the trait). This is also on production where we don't have cqrs changes yet in any way. Also, because it is working on production for users with existing traits, I believer there is a processor which is indexing traits in ES right now. In fact I can see success logs in its logs for the users for whom everything is working fine, and I can not see error logs for the user for whom we are not able to get traits even after they are saved.

@xxcxy
Copy link

xxcxy commented Oct 1, 2021

hmmm.... I tried on my local machine and used local_tc-bus-api, update es-processor's index and type to api's index and type. then it run correct. maybe it relate es version, i'm not sure.
https://monosnap.com/file/tnW0IulUbp9uwogvZAh1tJl9sreKHb
https://monosnap.com/file/NprSWegUkb56utRPZCpHxjW9I7iRRE
https://monosnap.com/file/K1puQdPnxskrC167hv2aTmEEMGKPz9
https://monosnap.com/file/cIvetvAaey40sBWqkCcmPn6wFCP87H
https://monosnap.com/file/o9fnkJwpFeksQrvhKeOa0uSHDwCRvD

@vikasrohit
Copy link
Author

vikasrohit commented Oct 1, 2021

sorry @xxcxy I am not able to follow you completely. What changes you have to make to get it working? or nothing?

which version you have on your local? 6.8.0 which is there in docker compose? Production is Elasticsearch 2.3 so that can be issue? but it should be consistent, isn't it? Can you please try with Elasticsearch 2.3?

@vikasrohit
Copy link
Author

In fact our dev env also has Elasticsearch 2.3 but QA team said they didn't see the issue in dev.

@xxcxy
Copy link

xxcxy commented Oct 1, 2021

I mean i don't changes anything.
I used 6.8

@xxcxy
Copy link

xxcxy commented Oct 1, 2021

In fact our dev env also has Elasticsearch 2.3 but QA team said they didn't see the issue in dev.

I didn't see it either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants