New facility to obtain data for PageList's
Lukas Krejci
lkrejci at redhat.com
Wed Sep 4 13:42:43 UTC 2013
On Wednesday, September 04, 2013 09:32:48 Jay Shaughnessy wrote:
... snip ...
> >
> > In both cases, I think a much better approach is to detect such occurences
> > and possibly warn the user that such thing might have happened. This is
> > now doable using PageList.isConsistent() and equivalent
> > PageControl.isConsistentWith() methods that can check whether given data,
> > the declared total size and the provided page control are consistent with
> > each other. The CLI users can now take advantage of those methods, but we
> > still need to add support to the Table class (or wherever it would be) in
> > GUI to show some warning strips or whatever to the user.
>
> So what would good handling look like? Is there a recommended best
> practice for when things are no longer consistent? A refresh of the
> view, or something like that?
>
In case of phantom read, you really have no other option but to refresh/retry.
It's caused by too much churn in the database. In case of going past the
number of available results, you can try to do some magic to recompute and go
to the current last page, but then, you could fail in that too, if the number
of results decreased further in the meantime and would have to retry yet
again.
More information about the rhq-devel
mailing list