[jira] [Updated] (OAK-4102) Break cyclic dependency of FileStore and SegmentTracker

2016-06-07 Thread Francesco Mari (JIRA)

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

Francesco Mari updated OAK-4102:

Attachment: OAK-4102-03.patch

The previous patch is broken. [^OAK-4102-03.patch] includes the missing files.

> Break cyclic dependency of FileStore and SegmentTracker
> ---
>
> Key: OAK-4102
> URL: https://issues.apache.org/jira/browse/OAK-4102
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Francesco Mari
>  Labels: technical_debt
> Fix For: 1.6
>
> Attachments: OAK-4102-01.patch, OAK-4102-02.patch, OAK-4102-03.patch
>
>
> {{SegmentTracker}} and {{FileStore}} are mutually dependent on each other. 
> This is problematic and makes initialising instances of these classes 
> difficult: the {{FileStore}} constructor e.g. passes a not fully initialised 
> instance to the {{SegmentTracker}}, which in turn writes an initial node 
> state to the store. Notably using the not fully initialised {{FileStore}} 
> instance!



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


[jira] [Updated] (OAK-4102) Break cyclic dependency of FileStore and SegmentTracker

2016-06-07 Thread Francesco Mari (JIRA)

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

Francesco Mari updated OAK-4102:

Attachment: OAK-4102-02.patch

[^OAK-4102-02.patch] contains the same changes as the previous patch rebased to 
the latest trunk. In addition, I added Javadoc on {{SegmentIdMaker}} and 
{{SegmentIdTable}}.

> Break cyclic dependency of FileStore and SegmentTracker
> ---
>
> Key: OAK-4102
> URL: https://issues.apache.org/jira/browse/OAK-4102
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Francesco Mari
>  Labels: technical_debt
> Fix For: 1.6
>
> Attachments: OAK-4102-01.patch, OAK-4102-02.patch
>
>
> {{SegmentTracker}} and {{FileStore}} are mutually dependent on each other. 
> This is problematic and makes initialising instances of these classes 
> difficult: the {{FileStore}} constructor e.g. passes a not fully initialised 
> instance to the {{SegmentTracker}}, which in turn writes an initial node 
> state to the store. Notably using the not fully initialised {{FileStore}} 
> instance!



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


[jira] [Updated] (OAK-4102) Break cyclic dependency of FileStore and SegmentTracker

2016-06-06 Thread Francesco Mari (JIRA)

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

Francesco Mari updated OAK-4102:

Attachment: OAK-4102-01.patch

The work for OAK-4373 made very easy to find a (potential) solution for this 
issue. With [^OAK-4102-01.patch] I propose the following changes:
# Introduce a {{SegmentIdMaker}} to create a new {{SegmentId}} given a msb/lsb 
pair.
# Remove the reference from {{SegmentIdTable}} to {{SegmentStore}}.
# In {{SegmentIdTable}} and {{SegmentTracker}}, every method that performs an 
insertion of a new {{SegmentId}} receives a reference to a {{SegmentIdMaker}}. 
The creation of the {{SegmentId}} is delegated to the {{SegmentIdMaker}} 
instance.
# {{SegmentStore}} can be used to lookup existing {{SegmentId}} or to create 
new data/bulk {{SegmentId}}. This change shelters users of a {{SegmentStore}} 
from the {{SegmentTracker}}, which is more and more an implementation detail of 
the {{SegmentStore}}.
I run every unit/integration test locally, and I didn't see any failure. The 
patch still needs some work, especially regarding documentation.  [~mduerig], 
what do you think about this?

> Break cyclic dependency of FileStore and SegmentTracker
> ---
>
> Key: OAK-4102
> URL: https://issues.apache.org/jira/browse/OAK-4102
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-tar
>Reporter: Michael Dürig
>Assignee: Francesco Mari
>  Labels: technical_debt
> Fix For: 1.6
>
> Attachments: OAK-4102-01.patch
>
>
> {{SegmentTracker}} and {{FileStore}} are mutually dependent on each other. 
> This is problematic and makes initialising instances of these classes 
> difficult: the {{FileStore}} constructor e.g. passes a not fully initialised 
> instance to the {{SegmentTracker}}, which in turn writes an initial node 
> state to the store. Notably using the not fully initialised {{FileStore}} 
> instance!



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


[jira] [Updated] (OAK-4102) Break cyclic dependency of FileStore and SegmentTracker

2016-04-25 Thread JIRA

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

Michael Dürig updated OAK-4102:
---
Assignee: Francesco Mari

> Break cyclic dependency of FileStore and SegmentTracker
> ---
>
> Key: OAK-4102
> URL: https://issues.apache.org/jira/browse/OAK-4102
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-next
>Reporter: Michael Dürig
>Assignee: Francesco Mari
>  Labels: technical_debt
> Fix For: 1.6
>
>
> {{SegmentTracker}} and {{FileStore}} are mutually dependent on each other. 
> This is problematic and makes initialising instances of these classes 
> difficult: the {{FileStore}} constructor e.g. passes a not fully initialised 
> instance to the {{SegmentTracker}}, which in turn writes an initial node 
> state to the store. Notably using the not fully initialised {{FileStore}} 
> instance!



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


[jira] [Updated] (OAK-4102) Break cyclic dependency of FileStore and SegmentTracker

2016-04-20 Thread JIRA

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

Michael Dürig updated OAK-4102:
---
Component/s: (was: segmentmk)
 segment-next

> Break cyclic dependency of FileStore and SegmentTracker
> ---
>
> Key: OAK-4102
> URL: https://issues.apache.org/jira/browse/OAK-4102
> Project: Jackrabbit Oak
>  Issue Type: Technical task
>  Components: segment-next
>Reporter: Michael Dürig
>  Labels: technical_debt
> Fix For: 1.6
>
>
> {{SegmentTracker}} and {{FileStore}} are mutually dependent on each other. 
> This is problematic and makes initialising instances of these classes 
> difficult: the {{FileStore}} constructor e.g. passes a not fully initialised 
> instance to the {{SegmentTracker}}, which in turn writes an initial node 
> state to the store. Notably using the not fully initialised {{FileStore}} 
> instance!



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