[
https://issues.apache.org/jira/browse/OAK-6656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16163156#comment-16163156
]
Vikas Saurabh edited comment on OAK-6656 at 9/12/17 4:04 PM:
-------------------------------------------------------------
Added ignored test at [r1808128|https://svn.apache.org/r1808128].
[~chetanm], while a very simple fix \[0] is add {{ordered}} to
{{MissingIndexProviderStrategy#ignore}} set. While that works as intended but
the log message isn't descriptive enough - basically there's no information
about which definition is being complained about. Inside the provider we do
have definition NodeState which we can log - that can be 'hint' enough to find
which index is being talked about. But, I was wondering if we can somehow get
the path information there. Any ideas?
\[0]:
{noformat}
diff --git
a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdate.java
b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdate.java
index 4d93bc6d4e..6805fe5f03 100644
---
a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdate.java
+++
b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdate.java
@@ -472,7 +472,7 @@ public class IndexUpdate implements Editor, PathSource {
private boolean failOnMissingIndexProvider = Boolean
.getBoolean("oak.indexUpdate.failOnMissingIndexProvider");
- private final Set<String> ignore = newHashSet("disabled");
+ private final Set<String> ignore = newHashSet("disabled", "ordered");
public void onMissingIndex(String type, NodeBuilder definition, String
indexPath)
throws CommitFailedException {
diff --git
a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedIndex.java
b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedIndex.java
index c8d5ec489e..e2ccb2e0d2 100644
---
a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedIndex.java
+++
b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedIndex.java
@@ -33,7 +33,7 @@ public interface OrderedIndex {
*/
String DEPRECATION_MESSAGE =
"Ordered Index has been deprecated since Oak 1.1.8. " +
- "Please replace the index definitions with Lucene Property index " +
+ "Please replace the index definition ({}) with Lucene Property index "
+
"and remove the index providers from the repository. " +
"See docs at http://jackrabbit.apache.org/oak/docs";
diff --git
a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexEditorProvider.java
b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexEditorProvider.java
index 3c9270dade..c64adf522a 100644
---
a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexEditorProvider.java
+++
b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexEditorProvider.java
@@ -46,7 +46,7 @@ public class OrderedPropertyIndexEditorProvider implements
IndexEditorProvider,
@Nonnull IndexUpdateCallback callback) throws
CommitFailedException {
if (OrderedIndex.TYPE.equals(type)) {
if (hit() % threshold == 0) {
- LOG.warn(OrderedIndex.DEPRECATION_MESSAGE);
+ LOG.warn(OrderedIndex.DEPRECATION_MESSAGE, definition);
}
}
return null;
{noformat}
was (Author: catholicon):
Added ignored test at [r1808128|https://svn.apache.org/r1808128].
[~chetanm], while a very simple fix is add {{ordered}} to
{{MissingIndexProviderStrategy#ignore}} set. While that works as intended but
the log message isn't descriptive enough - basically there's no information
about which definition is being complained about. Inside the provider we do
have definition NodeState which we can log - that can be 'hint' enough to find
which index is being talked about. But, I was wondering if we can somehow get
the path information there. Any ideas?
> OrderedPropertyIndexEditorProvider does not return Editor to IndexUpdate
> leading to "ordered" being marked as missing type
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: OAK-6656
> URL: https://issues.apache.org/jira/browse/OAK-6656
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: indexing
> Affects Versions: 1.7.7, 1.4.18, 1.6.5
> Reporter: Vikas Saurabh
> Assignee: Vikas Saurabh
> Labels: candidate_oak_1_4, candidate_oak_1_6
> Fix For: 1.8
>
>
> OAK-3768 removed support for {{ordered}} property index but the intention of
> the removal was that presence of ordered index should only log a WARN every
> now and then (10k times on invocation of EditorProvider).
> But, it returns {{null}} editor which is takes as there is no provider of
> ordered index. Which, in turn, as the config be, can fail commits (or async
> indexing if index was async).
> We should handle this gracefully.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)