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

Job 8cea962389554d1fb77025f33ded5398 raised an exception: Traceback (most recent call last): #11

Open
sentry-io bot opened this issue Oct 11, 2023 · 0 comments
Assignees

Comments

@sentry-io
Copy link

sentry-io bot commented Oct 11, 2023

Sentry Issue: KOLIBRI-DATA-PORTAL-BACKEND-3QM

Job 8cea962389554d1fb77025f33ded5398 raised an exception: Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/models/query.py", line 480, in update_or_create
    obj = self.select_for_update().get(**lookup)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/models/query.py", line 378, in get
    raise self.model.DoesNotExist(
morango.models.core.DoesNotExist: DatabaseMaxCounter matching query does not exist.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python3.8/site-packages/newrelic/hooks/database_psycopg2.py", line 50, in execute
    return super(CursorWrapper, self).execute(sql, parameters, *args,
  File "/usr/local/lib/python3.8/site-packages/newrelic/hooks/database_dbapi2.py", line 24, in execute
    return self.__wrapped__.execute(sql, parameters,
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "morango_databasemaxcounter_instance_id_partition_99e4f1fb_uniq"
DETAIL:  Key (instance_id, partition)=(2a824768-819a-a2be-c5ce-cbc06a31ec1e, 1ecd4056b8b3253d37461ab8e4ac541d) already exists.


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/morango/sync/controller.py", line 254, in _invoke_middleware
    result = middleware(prepared_context)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/morango/registry.py", line 228, in __call__
    result = operation(context)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/morango/sync/operations.py", line 942, in __call__
    result = self.handle(context)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/morango/sync/operations.py", line 1278, in handle
    _serialize_into_store(context.sync_session.profile, filter=context.filter)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/morango/sync/operations.py", line 277, in _serialize_into_store
    DatabaseMaxCounter.objects.update_or_create(
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/models/query.py", line 484, in update_or_create
    obj, created = self._create_object_from_params(lookup, params, lock=True)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/models/query.py", line 509, in _create_object_from_params
    six.reraise(*exc_info)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/utils/six.py", line 686, in reraise
    raise value
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/models/query.py", line 500, in _create_object_from_params
    obj = self.create(**params)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/models/query.py", line 394, in create
    obj.save(force_insert=True, using=self.db)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/models/base.py", line 807, in save
    self.save_base(using=using, force_insert=force_insert,
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/models/base.py", line 838, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/models/base.py", line 924, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/models/base.py", line 962, in _do_insert
    return manager._insert([self], fields=fields, return_id=update_pk,
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/models/query.py", line 1079, in _insert
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/models/sql/compiler.py", line 1112, in execute_sql
    cursor.execute(sql, params)
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/django/__init__.py", line 373, in execute
    return real_execute(self, sql, params)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/utils/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python3.8/site-packages/newrelic/hooks/database_psycopg2.py", line 50, in execute
    return super(CursorWrapper, self).execute(sql, parameters, *args,
  File "/usr/local/lib/python3.8/site-packages/newrelic/hooks/database_dbapi2.py", line 24, in execute
    return self.__wrapped__.execute(sql, parameters,
django.db.utils.IntegrityError: duplicate key value violates unique constraint "morango_databasemaxcounter_instance_id_partition_99e4f1fb_uniq"
DETAIL:  Key (instance_id, partition)=(2a824768-819a-a2be-c5ce-cbc06a31ec1e, 1ecd4056b8b3253d37461ab8e4ac541d) already exists.


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/kolibri/core/tasks/worker.py", line 61, in handle_finished_future
    result = future.result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 437, in result
    return self.__get_result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/kolibri/core/tasks/job.py", line 121, in execute_job
    result = func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/core/management/__init__.py", line 131, in call_command
    return command.execute(*args, **defaults)
  File "/usr/local/lib/python3.8/site-packages/kolibri/dist/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.8/site-packages/newrelic/packages/wrapt/wrappers.py", line 512, in __call__
    return self._self_wrapper(self.__wrapped__, instance,
  File "/usr/local/lib/python3.8/site-packages/newrelic/api/function_trace.py", line 127, in literal_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/kolibri_sync_extras_plugin/management/commands/sync_proceed_to.py", line 68, in handle
    raise SyncProceedToError(
kolibri_sync_extras_plugin.management.commands.sync_proceed_to.SyncProceedToError: Failed to finalize c564a04670b74aeaa9820a1f2812d0a0

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