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

error make update ES request err The 1s id or PK value is nil, close sync #380

Open
kevisong opened this issue Aug 3, 2020 · 3 comments

Comments

@kevisong
Copy link

kevisong commented Aug 3, 2020

Not sure why this is happening.
After sync to the point where the go-mysql-elasticsearch started. The following error pops out and the program exited.
image

@kevisong
Copy link
Author

kevisong commented Aug 3, 2020

I use id and uuid field to generate the es id field like below.

id = ["id", "uuid"]

Looks like the issue is caused by the "uuid" field.

Not sure why this field is causing this error.

This field has value that looks like this: 1596211247aad5020ad3z511ea81k88254008dd97a

Is it a string length problem? Can anybody help?

@kevisong
Copy link
Author

kevisong commented Aug 3, 2020

Update

I printed out the row which is used to get the ID. In sync.go line 449

image

It's all nil except for the id field.

image

Obviously the original data is not nil.

BTW, this happens when it syncs to the current time.

存量的可以同步,增量的无法同步。无法获取组合ID

@kevisong
Copy link
Author

kevisong commented Aug 4, 2020

Update

I made some changes in sync.go line 449. Instead of returning error. I return a default_key to make sure the process didn't crash.

image

Is it possible to merge this to the master branch? @siddontang

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

1 participant