-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
search_phase_execution_exception is out of range for a long for postgrest varchar id #352
Comments
we found the user_id like '110492135982403357918' will cause the exception. |
what type is |
hello, user_id is varchar(32) in postgres. |
hello, I find the code snippet is unused and will cause my problem, I will appreciate if that you can reply. # also handle foreign_keys
if node.parent:
fields = defaultdict(list)
try:
foreign_keys = self.query_builder.get_foreign_keys(
node.parent,
node,
)
except ForeignKeyError:
foreign_keys = self.query_builder._get_foreign_keys(
node.parent,
node,
)
foreign_values = [
payload.new.get(k) for k in foreign_keys[node.name]
]
for key in [key.name for key in node.primary_keys]:
for value in foreign_values:
if value:
fields[key].append(value)
# TODO: we should combine this with the filter above
# so we only hit Elasticsearch once
for doc_id in self.es._search(
self.index,
node.parent.table,
fields,
):
where: dict = {}
params = doc_id.split(PRIMARY_KEY_DELIMITER)
for i, key in enumerate(
self.tree.root.model.primary_keys
):
where[key] = params[i]
_filters.append(where) |
closing as this was addressed in commit |
PGSync version:
2.3.2
Postgres version:
PostgreSQL 13.2 (Debian 13.2-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
Elasticsearch version:
7.17.0
Redis version:
Redis version=5.0.6, bits=64
Python version:
python3.7
Problem Description:
We have a table project(id, xxx) and member(id, user_id,project_id, role_id, deleted) and user(id, phone, email, deleted).
and we have pgsync.yml bellow, and we found data synced to es successfully, but pgsync service restart somethings, the error message is search_phase_execution_exception is out of range for a long for postgrest varchar id.
Error Message (if any):
The text was updated successfully, but these errors were encountered: