Issue Details (XML | Word | Printable)

Key: IDENTITYCONNECTORS-487
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: davidadam
Reporter: george_hetrick
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
identityconnectors

SearchApiOpTests are slower than needed

Created: 07/May/09 11:05 AM   Updated: 25/Jan/11 02:46 PM
Component/s: contract
Affects Version/s: current
Fix Version/s: 1.0

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: All

Issue Links:
Dependency
 

Issuezilla Id: 487
Tags:
Participants: bfarrell, davidadam, george_hetrick and qouyang


 Description  « Hide

Running this against RACF takes a very long time (as much as 2 hours) because it asks for all objects to
be fetched with all attributes repeatedly. There are a few optimizations that could be used to reduce
this time.

1. When the filter translates to 'null', the test should be skipped, since there is already a search with
'null' (Line 177)
filter all attributes (RACF does not implement filter on anything other than NAME and UID)
coObjects = ConnectorHelper.search(getConnectorFacade(),
getObjectClass(), fltAllAtts,
getOperationOptionsByOp(SearchApiOp.class));

2. All this is is a repeat of the earlier fetch all objects, I'm not sure that it's useful (Line 192)
//check null filter
coObjects = ConnectorHelper.search(getConnectorFacade(), getObjectClass(), null,
getOperationOptionsByOp(SearchApiOp.class));
assertTrue("Null-filter search failed, wrong number of objects returned, expected: "
+ (uids.size() + coBeforeTest.size()) + " but found: "
+ coObjects.size(),
coObjects.size() == uids.size() + coBeforeTest.size());

3. All searches would be sped up considerably if attributes were not requested. Since there is already a compareExistingObjectsByUidOnly() method, this could be used to decide not to request attributes if
they won't be used.



george_hetrick added a comment - 07/May/09 01:32 PM

Point 3 above also applies to MultiOpTests.


davidadam added a comment - 11/May/09 04:59 AM

reassigning to myself


davidadam added a comment - 03/Jun/09 01:50 AM

SearchApiOp with null filter returns all RETURNED_BY_DEFAULT attributes.

Until I get a grip on this issue, the following could be done in connector schema:
mark the resource-expensive attributes as NOT_RETURNED_BY DEFAULT.

For instance:
nonReturnedByDefaultAttribute = AttributeInfoBuilder.build(
"ATTR_NAME", String.class,
EnumSet.of(Flags.NOT_RETURNED_BY_DEFAULT));


bfarrell added a comment - 03/Jun/09 08:55 AM

This issue also affects SAP. The account retrieve operation is very expensive.
SAP provides a quicker call to retrieve all users names, so I use that for the
null filter query. I would have to set all attributes to be not returned by
default to avoid the account retrieval call. It makes more sense for me to be
able to use the compareExistingObjectsByUidOnly() instead in these contract
tests. In SAP's case, a retrieval of all users and information shouldnt be in
the connector because we wouldnt want any consumer to actually use it.


qouyang added a comment - 22/Jun/09 01:10 AM

Move target_milestone from "milestone1" to "1.0"