[jira] [Resolved] (JCR-4213) It is useful to return an error code with DataStoreException when a record is not found

2017-11-14 Thread Vikas Saurabh (JIRA)

 [ 
https://issues.apache.org/jira/browse/JCR-4213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vikas Saurabh resolved JCR-4213.

   Resolution: Later
Fix Version/s: (was: 2.16)

As discussed in OAK-6935, this is no longer required immediately. Resolving as 
later.

> It is useful to return an error code with DataStoreException when a record is 
> not found
> ---
>
> Key: JCR-4213
> URL: https://issues.apache.org/jira/browse/JCR-4213
> Project: Jackrabbit Content Repository
>  Issue Type: Improvement
>  Components: jackrabbit-data
>Reporter: Vikas Saurabh
>Assignee: Vikas Saurabh
>Priority: Minor
> Attachments: JCR-4213.patch
>
>
> To help with cases like OAK-6935, it would be useful if 
> {{DataStoreException}}, on best effort basis, provides and error code too.
> An example stack that OAK-6935 logs currently looks like:
> {noformat}
>  
> org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl
>  Exception occurred while attempting to delete blob 
> df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f#4694
> org.apache.jackrabbit.core.data.DataStoreException: Record 
> df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f does not 
> exist
>   at 
> org.apache.jackrabbit.core.data.AbstractDataStore.getRecord(AbstractDataStore.java:58)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.OakFileDataStore.getRecordForId(OakFileDataStore.java:259)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.getRecordForId(DataStoreBlobStore.java:519)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.countDeleteChunks(DataStoreBlobStore.java:425)
>   at 
> org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl.purgeBlobsDeleted(ActiveDeletedBlobCollectorFactory.java:224)
>   at 
> org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService.lambda$initializeActiveBlobCollector$0(LuceneIndexProviderService.java:760)
> ...
> ...
> {noformat}
> /cc [~amjain]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (JCR-4213) It is useful to return an error code with DataStoreException when a record is not found

2017-11-14 Thread Vikas Saurabh (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-4213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16251220#comment-16251220
 ] 

Vikas Saurabh commented on JCR-4213:


bq. Is this an API change? Otherwise I don't see why we couldn't easily 
backport it...
Not completely sure. We're adding a new method (getErrorCode) and a few ctors 
to DataStoreException. DataStoreException is available in oak (to be consumed) 
- so, my guess is that it's indeed an API. But, yeah, if at all, it won't be a 
major bump.

> It is useful to return an error code with DataStoreException when a record is 
> not found
> ---
>
> Key: JCR-4213
> URL: https://issues.apache.org/jira/browse/JCR-4213
> Project: Jackrabbit Content Repository
>  Issue Type: Improvement
>  Components: jackrabbit-data
>Reporter: Vikas Saurabh
>Assignee: Vikas Saurabh
>Priority: Minor
> Fix For: 2.16
>
> Attachments: JCR-4213.patch
>
>
> To help with cases like OAK-6935, it would be useful if 
> {{DataStoreException}}, on best effort basis, provides and error code too.
> An example stack that OAK-6935 logs currently looks like:
> {noformat}
>  
> org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl
>  Exception occurred while attempting to delete blob 
> df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f#4694
> org.apache.jackrabbit.core.data.DataStoreException: Record 
> df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f does not 
> exist
>   at 
> org.apache.jackrabbit.core.data.AbstractDataStore.getRecord(AbstractDataStore.java:58)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.OakFileDataStore.getRecordForId(OakFileDataStore.java:259)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.getRecordForId(DataStoreBlobStore.java:519)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.countDeleteChunks(DataStoreBlobStore.java:425)
>   at 
> org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl.purgeBlobsDeleted(ActiveDeletedBlobCollectorFactory.java:224)
>   at 
> org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService.lambda$initializeActiveBlobCollector$0(LuceneIndexProviderService.java:760)
> ...
> ...
> {noformat}
> /cc [~amjain]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (JCR-4213) It is useful to return an error code with DataStoreException when a record is not found

2017-11-14 Thread Vikas Saurabh (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-4213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16251169#comment-16251169
 ] 

Vikas Saurabh commented on JCR-4213:


[~reschke],
bq. Does this have to be done before we branch 2.16? (Scheduled Nov 20)
I'm almost convinced that we don't need this at all - but if we do, then yes, 
it would need to be done before the cut (so, that it can be included in 
OAK-6925).

> It is useful to return an error code with DataStoreException when a record is 
> not found
> ---
>
> Key: JCR-4213
> URL: https://issues.apache.org/jira/browse/JCR-4213
> Project: Jackrabbit Content Repository
>  Issue Type: Improvement
>  Components: jackrabbit-data
>Reporter: Vikas Saurabh
>Assignee: Vikas Saurabh
>Priority: Minor
> Fix For: 2.16
>
> Attachments: JCR-4213.patch
>
>
> To help with cases like OAK-6935, it would be useful if 
> {{DataStoreException}}, on best effort basis, provides and error code too.
> An example stack that OAK-6935 logs currently looks like:
> {noformat}
>  
> org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl
>  Exception occurred while attempting to delete blob 
> df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f#4694
> org.apache.jackrabbit.core.data.DataStoreException: Record 
> df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f does not 
> exist
>   at 
> org.apache.jackrabbit.core.data.AbstractDataStore.getRecord(AbstractDataStore.java:58)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.OakFileDataStore.getRecordForId(OakFileDataStore.java:259)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.getRecordForId(DataStoreBlobStore.java:519)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.countDeleteChunks(DataStoreBlobStore.java:425)
>   at 
> org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl.purgeBlobsDeleted(ActiveDeletedBlobCollectorFactory.java:224)
>   at 
> org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService.lambda$initializeActiveBlobCollector$0(LuceneIndexProviderService.java:760)
> ...
> ...
> {noformat}
> /cc [~amjain]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (JCR-4213) It is useful to return an error code with DataStoreException when a record is not found

2017-11-14 Thread Vikas Saurabh (JIRA)

 [ 
https://issues.apache.org/jira/browse/JCR-4213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vikas Saurabh updated JCR-4213:
---
Attachment: JCR-4213.patch

[~amjain], I'm attaching [^JCR-4213.patch] for completeness. But, while working 
on this (and OAK-6935), it seemed to me that we can probably skip this one as 
"Won't fix" or later.

> It is useful to return an error code with DataStoreException when a record is 
> not found
> ---
>
> Key: JCR-4213
> URL: https://issues.apache.org/jira/browse/JCR-4213
> Project: Jackrabbit Content Repository
>  Issue Type: Improvement
>  Components: jackrabbit-data
>Reporter: Vikas Saurabh
>Assignee: Vikas Saurabh
>Priority: Minor
> Fix For: 2.16
>
> Attachments: JCR-4213.patch
>
>
> To help with cases like OAK-6935, it would be useful if 
> {{DataStoreException}}, on best effort basis, provides and error code too.
> An example stack that OAK-6935 logs currently looks like:
> {noformat}
>  
> org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl
>  Exception occurred while attempting to delete blob 
> df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f#4694
> org.apache.jackrabbit.core.data.DataStoreException: Record 
> df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f does not 
> exist
>   at 
> org.apache.jackrabbit.core.data.AbstractDataStore.getRecord(AbstractDataStore.java:58)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.OakFileDataStore.getRecordForId(OakFileDataStore.java:259)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.getRecordForId(DataStoreBlobStore.java:519)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.countDeleteChunks(DataStoreBlobStore.java:425)
>   at 
> org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl.purgeBlobsDeleted(ActiveDeletedBlobCollectorFactory.java:224)
>   at 
> org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService.lambda$initializeActiveBlobCollector$0(LuceneIndexProviderService.java:760)
> ...
> ...
> {noformat}
> /cc [~amjain]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (JCR-4213) It is useful to return an error code with DataStoreException when a record is not found

2017-11-13 Thread Vikas Saurabh (JIRA)

 [ 
https://issues.apache.org/jira/browse/JCR-4213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vikas Saurabh updated JCR-4213:
---
Fix Version/s: 2.16

> It is useful to return an error code with DataStoreException when a record is 
> not found
> ---
>
> Key: JCR-4213
> URL: https://issues.apache.org/jira/browse/JCR-4213
> Project: Jackrabbit Content Repository
>  Issue Type: Improvement
>  Components: jackrabbit-data
>Reporter: Vikas Saurabh
>Assignee: Vikas Saurabh
>Priority: Minor
> Fix For: 2.16
>
>
> To help with cases like OAK-6935, it would be useful if 
> {{DataStoreException}}, on best effort basis, provides and error code too.
> An example stack that OAK-6935 logs currently looks like:
> {noformat}
>  
> org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl
>  Exception occurred while attempting to delete blob 
> df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f#4694
> org.apache.jackrabbit.core.data.DataStoreException: Record 
> df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f does not 
> exist
>   at 
> org.apache.jackrabbit.core.data.AbstractDataStore.getRecord(AbstractDataStore.java:58)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.OakFileDataStore.getRecordForId(OakFileDataStore.java:259)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.getRecordForId(DataStoreBlobStore.java:519)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.countDeleteChunks(DataStoreBlobStore.java:425)
>   at 
> org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl.purgeBlobsDeleted(ActiveDeletedBlobCollectorFactory.java:224)
>   at 
> org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService.lambda$initializeActiveBlobCollector$0(LuceneIndexProviderService.java:760)
> ...
> ...
> {noformat}
> /cc [~amjain]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (JCR-4213) It is useful to return an error code with DataStoreException when a record is not found

2017-11-13 Thread Vikas Saurabh (JIRA)

 [ 
https://issues.apache.org/jira/browse/JCR-4213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vikas Saurabh updated JCR-4213:
---
Description: 
To help with cases like OAK-6935, it would be useful if {{DataStoreException}}, 
on best effort basis, provides and error code too.

An example stack that OAK-6935 logs currently looks like:
{noformat}
 
org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl
 Exception occurred while attempting to delete blob 
df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f#4694
org.apache.jackrabbit.core.data.DataStoreException: Record 
df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f does not exist
at 
org.apache.jackrabbit.core.data.AbstractDataStore.getRecord(AbstractDataStore.java:58)
at 
org.apache.jackrabbit.oak.plugins.blob.datastore.OakFileDataStore.getRecordForId(OakFileDataStore.java:259)
at 
org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.getRecordForId(DataStoreBlobStore.java:519)
at 
org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.countDeleteChunks(DataStoreBlobStore.java:425)
at 
org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl.purgeBlobsDeleted(ActiveDeletedBlobCollectorFactory.java:224)
at 
org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService.lambda$initializeActiveBlobCollector$0(LuceneIndexProviderService.java:760)
...
...
{noformat}

/cc [~amjain]

  was:
To help with cases like OAK-6935, it would be useful if {{DataStoreException}}, 
on best effort basis, provides and error code too.

An example stack that OAK-6935 logs currently looks like:
{noformat}
 
org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl
 Exception occurred while attempting to delete blob 
df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f#4694
org.apache.jackrabbit.core.data.DataStoreException: Record 
df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f does not exist
at 
org.apache.jackrabbit.core.data.AbstractDataStore.getRecord(AbstractDataStore.java:58)
at 
org.apache.jackrabbit.oak.plugins.blob.datastore.OakFileDataStore.getRecordForId(OakFileDataStore.java:259)
at 
org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.getRecordForId(DataStoreBlobStore.java:519)
at 
org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.countDeleteChunks(DataStoreBlobStore.java:425)
at 
org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl.purgeBlobsDeleted(ActiveDeletedBlobCollectorFactory.java:224)
at 
org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService.lambda$initializeActiveBlobCollector$0(LuceneIndexProviderService.java:760)
...
...
{noformat}


> It is useful to return an error code with DataStoreException when a record is 
> not found
> ---
>
> Key: JCR-4213
> URL: https://issues.apache.org/jira/browse/JCR-4213
> Project: Jackrabbit Content Repository
>  Issue Type: Improvement
>  Components: jackrabbit-data
>Reporter: Vikas Saurabh
>Assignee: Vikas Saurabh
>Priority: Minor
>
> To help with cases like OAK-6935, it would be useful if 
> {{DataStoreException}}, on best effort basis, provides and error code too.
> An example stack that OAK-6935 logs currently looks like:
> {noformat}
>  
> org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl
>  Exception occurred while attempting to delete blob 
> df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f#4694
> org.apache.jackrabbit.core.data.DataStoreException: Record 
> df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f does not 
> exist
>   at 
> org.apache.jackrabbit.core.data.AbstractDataStore.getRecord(AbstractDataStore.java:58)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.OakFileDataStore.getRecordForId(OakFileDataStore.java:259)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.getRecordForId(DataStoreBlobStore.java:519)
>   at 
> org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.countDeleteChunks(DataStoreBlobStore.java:425)
>   at 
> org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl.purgeBlobsDeleted(ActiveDeletedBlobCollectorFactory.java:224)
>   at 
> org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProv

[jira] [Created] (JCR-4213) It is useful to return an error code with DataStoreException when a record is not found

2017-11-13 Thread Vikas Saurabh (JIRA)
Vikas Saurabh created JCR-4213:
--

 Summary: It is useful to return an error code with 
DataStoreException when a record is not found
 Key: JCR-4213
 URL: https://issues.apache.org/jira/browse/JCR-4213
 Project: Jackrabbit Content Repository
  Issue Type: Improvement
  Components: jackrabbit-data
Reporter: Vikas Saurabh
Assignee: Vikas Saurabh
Priority: Minor


To help with cases like OAK-6935, it would be useful if {{DataStoreException}}, 
on best effort basis, provides and error code too.

An example stack that OAK-6935 logs currently looks like:
{noformat}
 
org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl
 Exception occurred while attempting to delete blob 
df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f#4694
org.apache.jackrabbit.core.data.DataStoreException: Record 
df38cfbdccbe27dba778679befd74b10e40c3eb46f96e58ee4bb6c2c6b993d3f does not exist
at 
org.apache.jackrabbit.core.data.AbstractDataStore.getRecord(AbstractDataStore.java:58)
at 
org.apache.jackrabbit.oak.plugins.blob.datastore.OakFileDataStore.getRecordForId(OakFileDataStore.java:259)
at 
org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.getRecordForId(DataStoreBlobStore.java:519)
at 
org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.countDeleteChunks(DataStoreBlobStore.java:425)
at 
org.apache.jackrabbit.oak.plugins.index.lucene.directory.ActiveDeletedBlobCollectorFactory$ActiveDeletedBlobCollectorImpl.purgeBlobsDeleted(ActiveDeletedBlobCollectorFactory.java:224)
at 
org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService.lambda$initializeActiveBlobCollector$0(LuceneIndexProviderService.java:760)
...
...
{noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (JCR-3954) Searches with backslash \ cause expection

2016-12-21 Thread Vikas Saurabh (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15768591#comment-15768591
 ] 

Vikas Saurabh commented on JCR-3954:


[~anagarwa], [~reschke] pointed me to JCR-3800. In that light, I think his 
[comment|https://issues.apache.org/jira/browse/JCR-3800?focusedCommentId=15767021&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15767021]
 over there makes more sense that improving this method (which already is doing 
fairly half hearted job). Let's follow up over there. In the mean time, I think 
we can close this issue on account of "not worth it".

> Searches with backslash \ cause expection
> -
>
> Key: JCR-3954
> URL: https://issues.apache.org/jira/browse/JCR-3954
> Project: Jackrabbit Content Repository
>  Issue Type: Bug
>  Components: jackrabbit-jcr-commons
>Affects Versions: 2.12.1
>Reporter: Ankit Agarwal
>Assignee: Vikas Saurabh
>
> while creating a query with '/' it creates an exception. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (JCR-3954) Searches with backslash \ cause expection

2016-12-19 Thread Vikas Saurabh (JIRA)

 [ 
https://issues.apache.org/jira/browse/JCR-3954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vikas Saurabh reassigned JCR-3954:
--

Assignee: Vikas Saurabh

> Searches with backslash \ cause expection
> -
>
> Key: JCR-3954
> URL: https://issues.apache.org/jira/browse/JCR-3954
> Project: Jackrabbit Content Repository
>  Issue Type: Bug
>  Components: jackrabbit-jcr-commons
>Affects Versions: 2.12.1
>Reporter: Ankit Agarwal
>Assignee: Vikas Saurabh
>
> while creating a query with '/' it creates an exception. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (JCR-3954) Searches with backslash \ cause expection

2016-12-19 Thread Vikas Saurabh (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15760658#comment-15760658
 ] 

Vikas Saurabh edited comment on JCR-3954 at 12/19/16 9:27 AM:
--

[~reschke], this seems like something that we can include, wdyt? Btw, I'm not 
sure what 
[_ESCAPE_CHAR|https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java#L539]
 is referring to.

Btw, [~anagarwa] we probably should update 
{{jackrabbit-jcr-tests/.../Text#escapeIllegalXpathSearchChars}} as well.

Assigning to myself so that it doesn't get lost again :)


was (Author: catholicon):
[~reschke], this seems like something that we can include, wdyt? Btw, I'm not 
sure what 
[_ESCAPE_CHAR|https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java#L539]
 is referring to.

Btw, [~anagarwa] we probably should update 
{{jackrabbit-jcr-tests/.../Text#escapeIllegalXpathSearchChars}} as well.

> Searches with backslash \ cause expection
> -
>
> Key: JCR-3954
> URL: https://issues.apache.org/jira/browse/JCR-3954
> Project: Jackrabbit Content Repository
>  Issue Type: Bug
>  Components: jackrabbit-jcr-commons
>Affects Versions: 2.12.1
>Reporter: Ankit Agarwal
>Assignee: Vikas Saurabh
>
> while creating a query with '/' it creates an exception. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (JCR-3954) Searches with backslash \ cause expection

2016-12-19 Thread Vikas Saurabh (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15760658#comment-15760658
 ] 

Vikas Saurabh commented on JCR-3954:


[~reschke], this seems like something that we can include, wdyt? Btw, I'm not 
sure what 
[_ESCAPE_CHAR|https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java#L539]
 is referring to.

Btw, [~anagarwa] we probably should update 
{{jackrabbit-jcr-tests/.../Text#escapeIllegalXpathSearchChars}} as well.

> Searches with backslash \ cause expection
> -
>
> Key: JCR-3954
> URL: https://issues.apache.org/jira/browse/JCR-3954
> Project: Jackrabbit Content Repository
>  Issue Type: Bug
>  Components: jackrabbit-jcr-commons
>Affects Versions: 2.12.1
>Reporter: Ankit Agarwal
>
> while creating a query with '/' it creates an exception. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (JCR-4042) Adding Escape Character in GQL

2016-11-08 Thread Vikas Saurabh (JIRA)

 [ 
https://issues.apache.org/jira/browse/JCR-4042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vikas Saurabh resolved JCR-4042.

   Resolution: Fixed
Fix Version/s: 2.13.5

Committed [^JCR-4042.take1.patch] on trunk at 
[r1768684|https://svn.apache.org/r1768684]. I'm resolving the issue but still 
feel that it requires some more tests. I'm out of ideas for those though.

/cc [~reschke], [~tmueller]

> Adding Escape Character in GQL
> --
>
> Key: JCR-4042
> URL: https://issues.apache.org/jira/browse/JCR-4042
> Project: Jackrabbit Content Repository
>  Issue Type: Bug
>  Components: jackrabbit-jcr-commons
>Reporter: Ankit Agarwal
>Assignee: Vikas Saurabh
> Fix For: 2.13.5
>
> Attachments: JCR-4042.take1.patch
>
>
> Currently GQL does not have a escape character. Adding the escape character 
> will help in special character cases for example where a search term contains 
> both colon ({{:}}) and quote ({{"}}) character.
> for example search string is {{foo:bar}}, if term is put in quote 
> {{"foo:bar"}} and this whole term is considered as a single search value. 
> But in case user need to search {{foo"abc:bar}} then putting this term in 
> quotes won't work. But if GQL will have a escape character, then user can 
> search this term using escape character. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (JCR-4042) Adding Escape Character in GQL

2016-11-08 Thread Vikas Saurabh (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-4042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15647338#comment-15647338
 ] 

Vikas Saurabh commented on JCR-4042:


I want to commit the current patch. [~tmueller], [~reschke], we can probably 
add more tests later. wdyt?

> Adding Escape Character in GQL
> --
>
> Key: JCR-4042
> URL: https://issues.apache.org/jira/browse/JCR-4042
> Project: Jackrabbit Content Repository
>  Issue Type: Bug
>  Components: jackrabbit-jcr-commons
>Reporter: Ankit Agarwal
>Assignee: Vikas Saurabh
> Attachments: JCR-4042.take1.patch
>
>
> Currently GQL does not have a escape character. Adding the escape character 
> will help in special character cases for example where a search term contains 
> both colon ({{:}}) and quote ({{"}}) character.
> for example search string is {{foo:bar}}, if term is put in quote 
> {{"foo:bar"}} and this whole term is considered as a single search value. 
> But in case user need to search {{foo"abc:bar}} then putting this term in 
> quotes won't work. But if GQL will have a escape character, then user can 
> search this term using escape character. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (JCR-4042) Adding Escape Character in GQL

2016-11-05 Thread Vikas Saurabh (JIRA)

 [ 
https://issues.apache.org/jira/browse/JCR-4042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vikas Saurabh reassigned JCR-4042:
--

Assignee: Vikas Saurabh

> Adding Escape Character in GQL
> --
>
> Key: JCR-4042
> URL: https://issues.apache.org/jira/browse/JCR-4042
> Project: Jackrabbit Content Repository
>  Issue Type: Bug
>  Components: jackrabbit-jcr-commons
>Reporter: Ankit Agarwal
>Assignee: Vikas Saurabh
> Attachments: JCR-4042.take1.patch
>
>
> Currently GQL does not have a escape character. Adding the escape character 
> will help in special character cases for example where a search term contains 
> both colon(:) and quote(") character.
> for example search string is foo:bar, if term is put in quote "foo:bar" and 
> this whole term is considered as a single search value. 
> But in case user need to search foo"abc:bar then putting this term in quotes 
> won't work. But if GQL will have a escape character, then user can search 
> this term using escape character. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (JCR-4042) Adding Escape Character in GQL

2016-10-24 Thread Vikas Saurabh (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-4042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15601928#comment-15601928
 ] 

Vikas Saurabh commented on JCR-4042:


[~reschke],
bq. Let's just treat "\something" as "something" consistently.
That's consistent with current patch. What I was trying to point out was that 
behavior of {{:}} is unique wrt to other (special or non-special) characters in 
the sense:
| |*escaped*|*non escaped*|
|*colon within* double quotes| literal | literal |
|*double-quotes within* double quotes| literal | end-double-quotes |
|*back-slash within* double quotes| literal | escape-sequence-prefix |
|*other within* double quotes| literal | literal |
|*colon outside* double quotes| literal | field-delimeter |
|*double-quotes outside* double quotes| literal | begin-double-quotes |
|*back-slash outside* double quotes| literal | escape-sequence-prefix |
|*other outside* double quotes| literal | literal |
i.e. unescaped {{:}} outside of quotes behaves different within double quotes 
as compared to without (other special characters always need to be escaped to 
be taken literally... otoh, other non-special-characters are always taken 
literally).

> Adding Escape Character in GQL
> --
>
> Key: JCR-4042
> URL: https://issues.apache.org/jira/browse/JCR-4042
> Project: Jackrabbit Content Repository
>  Issue Type: Bug
>  Components: jackrabbit-jcr-commons
>Reporter: Ankit Agarwal
> Attachments: JCR-4042.take1.patch
>
>
> Currently GQL does not have a escape character. Adding the escape character 
> will help in special character cases for example where a search term contains 
> both colon(:) and quote(") character.
> for example search string is foo:bar, if term is put in quote "foo:bar" and 
> this whole term is considered as a single search value. 
> But in case user need to search foo"abc:bar then putting this term in quotes 
> won't work. But if GQL will have a escape character, then user can search 
> this term using escape character. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (JCR-4042) Adding Escape Character in GQL

2016-10-21 Thread Vikas Saurabh (JIRA)

 [ 
https://issues.apache.org/jira/browse/JCR-4042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vikas Saurabh updated JCR-4042:
---
Attachment: JCR-4042.take1.patch

Attaching first attempt at doing this - [^JCR-4042.take1.patch]. [~tmueller], 
[~reschke], can you please take a look. I think we need a lot more coverage 
too. Ideas(/patches ;) ) welcome.

BTW, I've tried to maintain a bit of backward compatibility of ignoring 
backslash unless it's escaping double-quotes, backslash, and colon.

> Adding Escape Character in GQL
> --
>
> Key: JCR-4042
> URL: https://issues.apache.org/jira/browse/JCR-4042
> Project: Jackrabbit Content Repository
>  Issue Type: Bug
>  Components: jackrabbit-jcr-commons
>Reporter: Ankit Agarwal
> Attachments: JCR-4042.take1.patch
>
>
> Currently GQL does not have a escape character. Adding the escape character 
> will help in special character cases for example where a search term contains 
> both colon(:) and quote(") character.
> for example search string is foo:bar, if term is put in quote "foo:bar" and 
> this whole term is considered as a single search value. 
> But in case user need to search foo"abc:bar then putting this term in quotes 
> won't work. But if GQL will have a escape character, then user can search 
> this term using escape character. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (JCR-4042) Adding Escape Character in GQL

2016-10-20 Thread Vikas Saurabh (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-4042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15593116#comment-15593116
 ] 

Vikas Saurabh commented on JCR-4042:


[~amitgupt],
bq. just need escape character for colon
Pedantically speaking simple escaping won't work. There are probably 2 ways 
that we can think of escaping:
# use double colon to represent an escaped colon
# use another character (probably backslash) as escape sequence prefix

For case#1, there's no way to disambiguate {{a:::b}} between {{a:":b"}} and 
{{"a:":b}}... unless, we then also say that field names can't end in colon 
(which, afaik, isn't a restriction put by gql as of now).

For case#2, it'd require a list (of at least 2 characters - {{:}} and {{\}} 
)... and once we have a list why not put more (say double-quotes).

Btw, I think to maintain backward compatibility - colon would need to be 
allowed without escaping if quoted -> so, {{"a:b"}} must remain similar to 
{{a\:b}} and not {{a:b}}. 

> Adding Escape Character in GQL
> --
>
> Key: JCR-4042
> URL: https://issues.apache.org/jira/browse/JCR-4042
> Project: Jackrabbit Content Repository
>  Issue Type: Bug
>  Components: jackrabbit-jcr-commons
>Reporter: Ankit Agarwal
>
> Currently GQL does not have a escape character. Adding the escape character 
> will help in special character cases for example where a search term contains 
> both colon(:) and quote(") character.
> for example search string is foo:bar, if term is put in quote "foo:bar" and 
> this whole term is considered as a single search value. 
> But in case user need to search foo"abc:bar then putting this term in quotes 
> won't work. But if GQL will have a escape character, then user can search 
> this term using escape character. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (JCRVLT-128) System maintained cache nodes should be ignored

2016-09-21 Thread Vikas Saurabh (JIRA)

[ 
https://issues.apache.org/jira/browse/JCRVLT-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15509901#comment-15509901
 ] 

Vikas Saurabh commented on JCRVLT-128:
--

I wonder if vault should rather do such stuff for nodes with some specific 
mixin ({{rep:do_not_copy_past}}... of course with a better name ;))... and 
rep:cache nodes come with that mixin.
_Disclaimer: I don't know a lot of details around the requirement of rep 
cache... so, please take this comment with a grain of salt_

> System maintained cache nodes should be ignored
> ---
>
> Key: JCRVLT-128
> URL: https://issues.apache.org/jira/browse/JCRVLT-128
> Project: Jackrabbit FileVault
>  Issue Type: Bug
>Affects Versions: 3.1.28
>Reporter: Tommaso Teofili
> Attachments: JCRVLT-128.0.patch
>
>
> In OAK-3003 a persisted [principal 
> cache|http://jackrabbit.apache.org/oak/docs/security/principal/cache.html] 
> was introduced that creates _rep:cache_ nodes under authorizables.
> Creating a package for such authorizables will result in including the cache 
> node in there, which sounds wrong as that node is an implementation detail 
> which doesn't make sense to install anywhere; however that can be avoided by 
> proper filters.
> What is problematic is the installation phase, if an authorizable gets 
> packaged with FileVault (no rep:cache in the package) and the target 
> user/group has a rep:cache node itself the importer will try (and fail as 
> it's protected) to delete the persisted cache node if ImportMode is set to 
> UPDATE.
> In my opinion this is wrong, it should be possible to not touch such nodes on 
> package installation, regardless of the chosen ImportMode.
> {noformat}
> org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage Error during 
> install.
> javax.jcr.nodetype.ConstraintViolationException: OakConstraint0034: Attempt 
> to create or change the system maintained cache.
>   at 
> org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:225)
>   at 
> org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:212)
>   at 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.newRepositoryException(SessionDelegate.java:670)
>   at 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:496)
>   at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl$8.performVoid(SessionImpl.java:419)
>   at 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:274)
>   at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.save(SessionImpl.java:416)
>   at org.apache.jackrabbit.vault.fs.io.AutoSave.save(AutoSave.java:175)
>   at org.apache.jackrabbit.vault.fs.io.Importer.run(Importer.java:416)
>   at 
> org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.extract(ZipVaultPackage.java:234)
>   at 
> org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.extract(ZipVaultPackage.java:153)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (JCR-3979) Improve resilience when s3 is being initialized by local datastore

2016-05-19 Thread Vikas Saurabh (JIRA)

 [ 
https://issues.apache.org/jira/browse/JCR-3979?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vikas Saurabh updated JCR-3979:
---
Issue Type: Improvement  (was: Bug)

> Improve resilience when s3 is being initialized by local datastore
> --
>
> Key: JCR-3979
> URL: https://issues.apache.org/jira/browse/JCR-3979
> Project: Jackrabbit Content Repository
>  Issue Type: Improvement
>  Components: jackrabbit-data
>Reporter: Vikas Saurabh
>Assignee: Vikas Saurabh
>Priority: Minor
>
> Currently, during initialization, any upload error on any thread causes 
> initialization to fail. This makes initialization of big repositories quite 
> painful.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (JCR-3979) Improve resilience when s3 is being initialized by local datastore

2016-05-19 Thread Vikas Saurabh (JIRA)

[ 
https://issues.apache.org/jira/browse/JCR-3979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15291164#comment-15291164
 ] 

Vikas Saurabh commented on JCR-3979:


There can a few options to do a better job at handling such cases:
# We can have retry/upload and maxNumOfFailures (both configurable) to reduce 
the probability of initial sync failue.
## If maxNumOfFailures aren't hit then we can retry those uploads which failed 
at the end of initial sync to have a go at them again
# Don't fail sync on upload failure, but keep track of uploads that failed. 
Then, as phase 2 of initial sync, retry those failures
# Identify the cause of upload failure and do some back-off in case the error 
is more to do with choking the capabilities (over zealous configurations)

(we can, of course, do a mix of any of those)

(cc [~shgupta], [~amjain])

> Improve resilience when s3 is being initialized by local datastore
> --
>
> Key: JCR-3979
> URL: https://issues.apache.org/jira/browse/JCR-3979
> Project: Jackrabbit Content Repository
>  Issue Type: Bug
>  Components: jackrabbit-data
>Reporter: Vikas Saurabh
>Assignee: Vikas Saurabh
>Priority: Minor
>
> Currently, during initialization, any upload error on any thread causes 
> initialization to fail. This makes initialization of big repositories quite 
> painful.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (JCR-3979) Improve resilience when s3 is being initialized by local datastore

2016-05-19 Thread Vikas Saurabh (JIRA)
Vikas Saurabh created JCR-3979:
--

 Summary: Improve resilience when s3 is being initialized by local 
datastore
 Key: JCR-3979
 URL: https://issues.apache.org/jira/browse/JCR-3979
 Project: Jackrabbit Content Repository
  Issue Type: Bug
  Components: jackrabbit-data
Reporter: Vikas Saurabh
Assignee: Vikas Saurabh
Priority: Minor


Currently, during initialization, any upload error on any thread causes 
initialization to fail. This makes initialization of big repositories quite 
painful.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)