[jira] [Commented] (OAK-6797) DocumentStore conditional remove: EXISTS on non-revision property?

2017-10-11 Thread Marcel Reutegger (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-6797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16200257#comment-16200257
 ] 

Marcel Reutegger commented on OAK-6797:
---

Yes, sounds good to me.

> DocumentStore conditional remove: EXISTS on non-revision property?
> --
>
> Key: OAK-6797
> URL: https://issues.apache.org/jira/browse/OAK-6797
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: documentmk
>Reporter: Julian Reschke
>Priority: Minor
> Attachments: OAK-6797.diff
>
>
> Implementations currently differ in whether the "Exists" condition works on a 
> non-revision property.
> (RDBDS and MongoDS seem to support it, while MemoryDS does not).



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


[jira] [Commented] (OAK-6797) DocumentStore conditional remove: EXISTS on non-revision property?

2017-10-11 Thread Julian Reschke (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-6797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16200239#comment-16200239
 ] 

Julian Reschke commented on OAK-6797:
-

Well. Yes... This is because we use these conditions in several places 
(conditional update and remove). The different DS implementations evaluate 
those conditions in different ways:

- MemoryDS always uses the same checker method
- MongoDS (IMHO) always passes the condition to Mongo
- RDBDS has a mix of both

>From a systematic point of view, it's strange that same conditions work on 
>non-revision properties while others do not. It would probably be best to be 
>consistent, and have test coverage for that for the DS update operation.

For the conditional remove we could then profile what we want to require (and 
have test coverage for that as well, so tha tthe impls stay in sync).

[~mreutegg] - makes sense?

> DocumentStore conditional remove: EXISTS on non-revision property?
> --
>
> Key: OAK-6797
> URL: https://issues.apache.org/jira/browse/OAK-6797
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: documentmk
>Reporter: Julian Reschke
>Priority: Minor
> Attachments: OAK-6797.diff
>
>
> Implementations currently differ in whether the "Exists" condition works on a 
> non-revision property.
> (RDBDS and MongoDS seem to support it, while MemoryDS does not).



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


[jira] [Commented] (OAK-6797) DocumentStore conditional remove: EXISTS on non-revision property?

2017-10-10 Thread Marcel Reutegger (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-6797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16198548#comment-16198548
 ] 

Marcel Reutegger commented on OAK-6797:
---

Ah, maybe that's a misunderstanding and those two specific conditions are 
indeed not used. What I was trying to say is, Conditions in general may also be 
used on non-revision properties, such as the condition on _modified when  
{{DocumentStore.remove(Collection, Map)}} is used by the 
VersionGarbageCollector.

> DocumentStore conditional remove: EXISTS on non-revision property?
> --
>
> Key: OAK-6797
> URL: https://issues.apache.org/jira/browse/OAK-6797
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: documentmk
>Reporter: Julian Reschke
>Priority: Minor
> Attachments: OAK-6797.diff
>
>
> Implementations currently differ in whether the "Exists" condition works on a 
> non-revision property.
> (RDBDS and MongoDS seem to support it, while MemoryDS does not).



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


[jira] [Commented] (OAK-6797) DocumentStore conditional remove: EXISTS on non-revision property?

2017-10-10 Thread Julian Reschke (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-6797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16198509#comment-16198509
 ] 

Julian Reschke commented on OAK-6797:
-

[~mreutegg]: not sure about:

bq. Fix the Condition JavaDoc. Both EXISTS and MISSING conditions may also be 
used for top level non-revision properties.

Unless I'm missing something, this currently doesn't work for MemoryDS nor for 
RDBDS (using the same checker method). Are you sure it's used anywhere?

> DocumentStore conditional remove: EXISTS on non-revision property?
> --
>
> Key: OAK-6797
> URL: https://issues.apache.org/jira/browse/OAK-6797
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: documentmk
>Reporter: Julian Reschke
>Priority: Minor
> Attachments: OAK-6797.diff
>
>
> Implementations currently differ in whether the "Exists" condition works on a 
> non-revision property.
> (RDBDS and MongoDS seem to support it, while MemoryDS does not).



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


[jira] [Commented] (OAK-6797) DocumentStore conditional remove: EXISTS on non-revision property?

2017-10-10 Thread Marcel Reutegger (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-6797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16198394#comment-16198394
 ] 

Marcel Reutegger commented on OAK-6797:
---

My preferred approach is:

- Fix the Condition JavaDoc. Both EXISTS and MISSING conditions may also be 
used for top level non-revision properties.
- Limit the conditional DocumentStore.remove() contract to only support 
conditions on non-revision properties.
- Change the DocumentStore implementations accordingly. I.e. throw an exception 
when a remove condition is for a revision property.

[~reschke], WDYT?

> DocumentStore conditional remove: EXISTS on non-revision property?
> --
>
> Key: OAK-6797
> URL: https://issues.apache.org/jira/browse/OAK-6797
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: documentmk
>Reporter: Julian Reschke
>Priority: Minor
> Attachments: OAK-6797.diff
>
>
> Implementations currently differ in whether the "Exists" condition works on a 
> non-revision property.
> (RDBDS and MongoDS seem to support it, while MemoryDS does not).



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


[jira] [Commented] (OAK-6797) DocumentStore conditional remove: EXISTS on non-revision property?

2017-10-09 Thread Julian Reschke (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-6797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16196847#comment-16196847
 ] 

Julian Reschke commented on OAK-6797:
-

As far as I can tell, the only place (outside tests and wrappers) where the 
conditional remove is used is in 
{{org.apache.jackrabbit.oak.plugins.document.VersionGarbageCollector.DeletedDocsGC.removeDeletedDocuments(Iterator,
 long, boolean, String)}}. In that case, only the variant with equals check for 
MODIFIED is used.

> DocumentStore conditional remove: EXISTS on non-revision property?
> --
>
> Key: OAK-6797
> URL: https://issues.apache.org/jira/browse/OAK-6797
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: documentmk
>Reporter: Julian Reschke
>Priority: Minor
> Attachments: OAK-6797.diff
>
>
> Implementations currently differ in whether the "Exists" condition works on a 
> non-revision property.
> (RDBDS and MongoDS seem to support it, while MemoryDS does not).



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


[jira] [Commented] (OAK-6797) DocumentStore conditional remove: EXISTS on non-revision property?

2017-10-08 Thread Julian Reschke (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-6797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16196154#comment-16196154
 ] 

Julian Reschke commented on OAK-6797:
-

Note the spec for Condition says:

{noformat}
 * Check if a sub-key exists in a map.
{noformat}


> DocumentStore conditional remove: EXISTS on non-revision property?
> --
>
> Key: OAK-6797
> URL: https://issues.apache.org/jira/browse/OAK-6797
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: documentmk
>Reporter: Julian Reschke
>Priority: Minor
> Attachments: OAK-6797.diff
>
>
> Implementations currently differ in whether the "Exists" condition works on a 
> non-revision property.
> (RDBDS and MongoDS seem to support it, while MemoryDS does not).



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