#49262 Enqueue tasks that need the same resource
Closed: wontfix 3 years ago by spichugi. Opened 6 years ago by darix.

Issue Description

Given the following ldif

# addindex.ldif
dn: cn=someattribute,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
changetype: add
objectClass: top
objectClass: nsIndex
cn: someattribute
nsSystemIndex: false
nsIndexType: eq

dn: cn=someattribute_add_eq,cn=index,cn=tasks,cn=config
changetype: add
objectclass: top
objectclass: extensibleObject
cn: someattribute_add_eq
nsInstance: userRoot
nsIndexAttribute: someattribute:eq

dn: cn=someattribute2,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
changetype: add
objectClass: top
objectClass: nsIndex
cn: someattribute2
nsSystemIndex: false
nsIndexType: eq

dn: cn=someattribute2_add_eq,cn=index,cn=tasks,cn=config
changetype: add
objectclass: top
objectclass: extensibleObject
cn: someattribute2_add_eq
nsInstance: userRoot
nsIndexAttribute: someattribute2:eq
[18/May/2017:11:29:47.918461681 +0200] - INFO - ldbm_back_ldbm2index - userRoot: Indexing attribute: someattribute
[18/May/2017:11:29:48.063145088 +0200] - ERR - ldbm_back_ldbm2index - ldbm: 'userRoot' is already in the middle of another task and cannot be disturbed.
[18/May/2017:11:29:48.100365429 +0200] - ERR - task_index_thread - Index failed (error -1)
[18/May/2017:11:29:49.785342520 +0200] - INFO - ldbm_back_ldbm2index - userRoot: Indexed 1000 entries (27%).
[18/May/2017:11:29:51.591143180 +0200] - INFO - ldbm_back_ldbm2index - userRoot: Indexed 2000 entries (55%).
[18/May/2017:11:29:55.212496907 +0200] - INFO - ldbm_back_ldbm2index - userRoot: Indexed 3000 entries (82%).
[18/May/2017:11:29:57.302965953 +0200] - INFO - ldbm_back_ldbm2index - userRoot: Finished indexing.

The 2nd task should be enqueued and wait for the DB access to free up. in the current situation it is hard to script the process.

Package Version and Platform

389-ds-1.3.6.4-39.1.x86_64 on openSUSE Tumbleweed

Steps to reproduce

  1. load ldif
  2. observe error in log

Actual results

error

Expected results

tasks processed in a row


Metadata Update from @mreynolds:
- Custom field type adjusted to defect
- Issue set to the milestone: 1.4 backlog

6 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/2321

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata