[
https://issues.apache.org/jira/browse/OAK-3606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15605235#comment-15605235
]
Stefan Eissing commented on OAK-3606:
-------------------------------------
So, for a particular index, the {{LastIndexedTime}} is only relevant for
changes that would lead to a index update. Indices unaffected by changes stay
in the past.
When a change is triggered for an index, it save current time as
{{checkpointTime}} and announces (to the tracker?) that {{checkpointTime}} is
unmet. The tracker (or someone else) has then a set {{unmetCheckpoints}} where
it keep indexPath and {{checkpointTime}} tuples. When an index is written, it
records the {{checkpointTime}} at the index node. The index is read again and
and the tracker removes all {{checkpointTime}}s equal or less from the
{{unmetCheckpoint}}s for that index.
The MBean property {{IndicesReflectChangesUntil}} would give the time up to
which changes have been worked into the indices as:
* have {{unmetCheckpoints}}: {{min(unmetCheckpoints)}}
* otherwise: {{max(checkpointTimes)}}
Could that work?
> Improvements for IndexStatsMBean usage
> --------------------------------------
>
> Key: OAK-3606
> URL: https://issues.apache.org/jira/browse/OAK-3606
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core, lucene
> Affects Versions: 1.3.9
> Reporter: Thierry Ygé
> Assignee: Chetan Mehrotra
> Attachments: adding_new_MBean.patch,
> new_mbean_interface_and_implementation.patch
>
>
> When running integration tests, it is common to have the need to wait for the
> async indexes to have been executed. So that the test can successfully
> validate operations that depend on the search result.
> With the current IndexStatsMBean implementation it cannot return the start
> time of the last successful indexing. It provide a "LastIndexedTime" which is
> not sufficient to know if changes made recently are now indexed.
> The idea is to set the start time as value of a new attribute (i.e
> "StartLastSuccessIndexedTime") to the IndexStatsMBean.
> Then create a new Mbean that calculate from all existing IndexStatsMBean (as
> multiple are possible now) the oldest "StartLastSuccessIndexedTime".
> That will allow integration tests to be able to wait until that oldest
> "StartLastSuccessIndexedTime" is greater than the time it started to wait.
> Attached is a sample patch containing the necessary changes (for a Oak core
> 1.4.0-SNAPSHOT).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)