#50119 Ticket 50117 - after certain failed import operation, impossible to replay an import operation
Closed 3 years ago by spichugi. Opened 5 years ago by tbordaz.
tbordaz/389-ds-base ticket_50117  into  master

@@ -704,12 +704,22 @@ 

      }

  

      /* check if an import/restore is already ongoing... */

-     if ((instance_set_busy(inst) != 0) ||

-         (slapi_counter_get_value(inst->inst_ref_count) > 0)) {

+     if ((instance_set_busy(inst) != 0)) {

          slapi_log_err(SLAPI_LOG_ERR, "ldbm_back_ldif2ldbm", "ldbm: '%s' is already in the middle of "

                                                              "another task and cannot be disturbed.\n",

                        inst->inst_name);

          return -1;

+     } else {

+         uint64_t refcnt;

+         refcnt = slapi_counter_get_value(inst->inst_ref_count);

+         if (refcnt > 0) {

+             slapi_log_err(SLAPI_LOG_ERR, "ldbm_back_ldif2ldbm", "ldbm: '%s' there are %d pending operation(s)."

+                     " Import can not proceed until they are completed.\n",

+                     inst->inst_name,

+                     refcnt);

+             instance_set_not_busy(inst);

+             return -1;

+         }

      }

  

      if ((task_flags & SLAPI_TASK_RUNNING_FROM_COMMANDLINE)) {

Bug Description:
At the beginning of an import, a flag is set to mark the target backend is busy.
Then import tests if there are pending operations. If such operations exist the import can not proceed and fails.
The problem is that in such case of pending operations, the import fails without resetting the busy flag.
It let the backend busy (until next reboot) and prevent new import.

Fix Description:
It needs to reset the busy flag if there are pending operations

https://pagure.io/389-ds-base/issue/50117

Reviewed by: ?

Platforms tested: F27

Flag Day: no

Doc impact: no

More of a grammar issue here. This should read something like: "ldbm: '%s' there are %d pending operation(s)." The rest looks good ACK!

rebased onto 784c16e0a478ed26c3d57e75cc7ffd2c8b21ddb6

5 years ago

rebased onto ff00b07

5 years ago

Pull-Request has been merged by tbordaz

5 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 pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3178

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago
Metadata