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

Chetan Mehrotra resolved OAK-4992.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.5.13
                   Segment Tar 0.0.18

Done in r1766542

* Changed the config property name for role to {{role}} (instead of 
nsProvider.role earlier /cc [~tomek.rekawek])
* Directory name would be like <role name>-segmentstore
{noformat}
repository/
├── cache
├── diff-cache
├── index
└── secondary-segmentstore
    ├── journal.log
    ├── manifest
    └── repo.lock
{noformat}

> Use the role name as prefix for directory used by SegmentNodeStoreFactory
> -------------------------------------------------------------------------
>
>                 Key: OAK-4992
>                 URL: https://issues.apache.org/jira/browse/OAK-4992
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segment-tar, segmentmk
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>            Priority: Minor
>             Fix For: 1.6, Segment Tar 0.0.18, 1.5.13
>
>
> Currently SegmentNodeStoreFactory uses a directory named {{segmentstore}} 
> under repository home to store the segment files. To allow easier setup where 
> multiple NodeStore instance do not overstep on each other this name should be 
> prefixed with {{role}} 
> Note that code tries to do the same currently with logic below but it ends up 
> always creating {{segmentstore}} folder under repository home. As a fix 
> {{role}} should be used in {{getDirectory}} method
> {code}
>     private File getBaseDirectory() {
>         String directory = property(DIRECTORY);
>         if (directory != null) {
>             return new File(directory);
>         }
>         if (role == null) {
>             return new File("tarmk");
>         } else {
>             return new File("tarmk-" + role);
>         }
>     }
>     private File getDirectory() {
>         return new File(getBaseDirectory(), "segmentstore");
>     }
> {code}



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

Reply via email to