Browse Source

Issue 4706 - negative wtime in access log for CMP operations

Description:  We forgot to set the start time for compare operations,
              this led to invalid values in the access log for optime
              and wtime.

relates: https://github.com/389ds/389-ds-base/issues/4706

Reviewed by: mreynolds (one line commit ruile)
Mark Reynolds 4 years ago
parent
commit
ed47734086
1 changed files with 5 additions and 0 deletions
  1. 5 0
      ldap/servers/slapd/compare.c

+ 5 - 0
ldap/servers/slapd/compare.c

@@ -52,6 +52,11 @@ do_compare(Slapi_PBlock *pb)
 
     slapi_pblock_get(pb, SLAPI_OPERATION, &pb_op);
     slapi_pblock_get(pb, SLAPI_CONNECTION, &pb_conn);
+
+    /* Set the time we actually started the operation */
+    if (pb_op) {
+        slapi_operation_set_time_started(pb_op);
+    }
     if (pb_op == NULL || pb_conn == NULL) {
         slapi_log_err(SLAPI_LOG_ERR, "do_compare", "NULL param: pb_conn (0x%p) pb_op (0x%p)\n",
                       pb_conn, pb_op);