Bug 123840 Incorrect use of static fields in NEvaluator and FilterPassController
Data Engine classes org.eclipse.birt.data.engine.script.NEvaluator and FilterPassController (used for top-n and bottom-n filter process) use static class fields to store proessing data. This is not multi-thread safe. If there are concurrent requests running in the same JVM (even if they use different instances of DataEngine), data corruption will occur since multiple requests may get/set the static fields at the same time. These classes should keep all per-request data in instance fields. Each report query need to have its own instance.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/script/NEvaluator.java
}
		return false;
	}
	/**
	 * Do the first pass. In the first pass we maintain a value list and a row id list that will
	 * host all top/bottom N values/rowIds so that in pass 2 we can use them to filter rows out.
	 * @param value
	 * @return
	 * @throws DataException
	 */
	private boolean doFirstPass( Object value ) throws DataException
	{
		firstPassRowNumberCounter++;
		if ( valueList == null )
		{
			valueList = new Object[N];
			rowIdList = new int[N];
		}
		populateValueListAndRowIdList( value, N );
		return false;
	}
	/**
	 * @param value
	 * @param N
	 * @throws DataException
	 */
	private void populateValueListAndRowIdList( Object value, int N ) throws DataException
	{
		for( int i = 0; i < N; i++ )
		{