#498 Cannot abandon simple paged result search
Closed: wontfix None Opened 11 years ago by nhosoi.

This enhancement "Ticket #260 - 389 DS does not support multiple paging controls on a single connection" broke the ability to abandon the on-going simple paged result search.

The abandon request expects the operation exist. When sending an abort request, the search operation could have already finished and the operation object is released.

Plus, request page size is 0, it should be interpreted as abandoned.


Bug Description: The enhancement "Ticket #260 - 389 DS does not
support multiple paging controls on a single connection (commit
add880a)" broke the ability to
abandon the on-going simple paged result search.

1) The abandon request expects the operation exist. When sending
an abort request, the search operation could have already finished
and the operation object has been released.

2) Plus, request page size is 0, it should be interpreted as abandoned.

Fix Description:
1) In do_abandon, this patch eliminates to check if the operation
is a simplepaged results oriented or not, since the operation object
is often already released. Instead, it directly checks the internal
paged results info in the connection object.

To make sure the abandoned search won't go further, a flag value
CONN_FLAG_PAGEDRESULTS_ABANDONED is introduced. If it is set in
the pagedresults structure in the connection object, it skips any
further process of the search.

2) This patch is adding a check if the given page size is 0 in the
simple-paged-results control or not. If it is 0, treat is as an
abandoned operation.

This looks odd to me:
{{{
if ( 0 == pagedresults_free_one_msgid_nolock(pb->pb_conn, id) ) {
156 slapi_log_access( LDAP_DEBUG_STATS, "conn=%" NSPRIu64
157 " op=%d ABANDON targetop=Simple Paged Results\n",
158 pb->pb_conn->c_connid, pb->pb_op->o_opid );
159 } if ( NULL == o ) {
162 160 slapi_log_access( LDAP_DEBUG_STATS, "conn=%" NSPRIu64 " op=%d ABANDON"
163 161 " targetop=NOTFOUND msgid=%d\n",
164 162 pb->pb_conn->c_connid, pb->pb_op->o_opid, id );
}}}
did you mean to change
{{{
} else if ( NULL == o ) ...
}}}
to
{{{
} if ( NULL == o ) ...
}}}
?

Oops. You are right. Thanks! I'm going to fix it and rerun the test...

Reviewed by Rich (Thank you!!)

Pushed to master.

$ git merge bz866623
Updating 544f027..47c0d96
Fast-forward
ldap/servers/slapd/abandon.c | 10 +++-----
ldap/servers/slapd/opshared.c | 19 +++++++++++++---
ldap/servers/slapd/pagedresults.c | 41 +++++++++++++++++++++++++-----------
ldap/servers/slapd/slap.h | 15 +++++++------
4 files changed, 55 insertions(+), 30 deletions(-)

$ git push origin master
Counting objects: 17, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 2.04 KiB, done.
Total 9 (delta 7), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
544f027..47c0d96 master -> master

Cherry picked from commit 47c0d96
and pushed to origin/389-ds-base-1.2.11.

$ git push origin 389-ds-base-1.2.11-ext:389-ds-base-1.2.11
Counting objects: 17, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 2.09 KiB, done.
Total 9 (delta 7), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
55997a6..9738860 389-ds-base-1.2.11-ext -> 389-ds-base-1.2.11

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.2.11.17

7 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/498

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 (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata