So, i just spent some time debugging, why the couchbase client went crazy:
But the method actually expects "upper" first and then "lower". It is such a subtle mistake and i did not even consider this method call to be wrong. It has to do with my expectation, that i expect ranges in order from left to right. Such as "from..to" or "start...end" and in this case: "lower..upper", so its my bad.
But is it possible to make a simple sanity check over the parameters? "lower > upper" could be asserted. It probably saves someone else's time.