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

Axel Hanikel updated OAK-7849:
------------------------------
    Description: 
In order to increase reproducibility of tests which measure things like the 
duration of operations or their latency, the idea is to record a log of the 
changes committed to the segment store, which could later be replayed. That 
replay is expected to produce the same results when run on the same machine 
under the same conditions. That way, different versions of the segment store 
can be compared more easily.

 The log could look like this:
{noformat}
1537963348079 FelixStartLevel n+ :clusterConfig
1537963348079 FelixStartLevel p+ :clusterId <STRING> = 
bf462164-be56-4023-94ef-f8bafc3eb49f
1537963348079 FelixStartLevel n!
1537963348079 FelixStartLevel n!
1537963350142 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType <NAME> 
= rep:root
1537963350142 Apache+Sling+Repository+Startup+Thread n+ oak:index
1537963350142 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType <NAME> 
= nt:unstructured
1537963350142 Apache+Sling+Repository+Startup+Thread n+ socialLucene
1537963350142 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType <NAME> 
= oak:QueryIndexDefinition
1537963350142 Apache+Sling+Repository+Startup+Thread p+ compatVersion <LONG> = 2
1537963350142 Apache+Sling+Repository+Startup+Thread p+ name <STRING> = 
socialLucene
1537963350142 Apache+Sling+Repository+Startup+Thread p+ type <STRING> = lucene
1537963350142 Apache+Sling+Repository+Startup+Thread p+ async <STRINGS> = 
[async,nrt]
1537963350142 Apache+Sling+Repository+Startup+Thread p+ 
evaluatePathRestrictions <BOOLEAN> = true
1537963350142 Apache+Sling+Repository+Startup+Thread p+ reindex <BOOLEAN> = true
1537963350143 Apache+Sling+Repository+Startup+Thread n+ indexRules
1537963350143 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType <NAME> 
= nt:unstructured
1537963350143 Apache+Sling+Repository+Startup+Thread p+ :childOrder <NAMES> = 
[social:asiResource]
1537963350143 Apache+Sling+Repository+Startup+Thread n+ social:asiResource
1537963350143 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType <NAME> 
= nt:unstructured
1537963350143 Apache+Sling+Repository+Startup+Thread p+ :childOrder <NAMES> = 
[properties]{noformat}
where each line consists of a time stamp, the thread name, the operation (+ = 
added, - = removed, ^ = changed, ! = up to parent, n = node, p = property), the 
name (urlencoded except for : and / (for readability)), the type between angle 
brackets, and a value (urlencoded as well, and a comma-separated list between 
square brackets in case of multiple values). An 'n!' at the root node level 
ends a commit. Blob values are encoded as a simple string of bytes converted to 
hex.

  was:
In order to increase reproducibility of tests which measure things like the 
duration of operations or their latency, the idea is to record a log of the 
changes committed to the segment store, which could later be replayed. That 
replay is expected to produce the same results when run on the same machine 
under the same conditions. That way, different versions of the segment store 
can be compared more easily.

 The log could look like this:
{noformat}
1537963348079 FelixStartLevel n+ :clusterConfig
1537963348079 FelixStartLevel p+ :clusterId <STRING> = 
bf462164-be56-4023-94ef-f8bafc3eb49f
1537963348079 FelixStartLevel n!
1537963348079 FelixStartLevel n!
1537963350142 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType <NAME> 
= rep:root
1537963350142 Apache+Sling+Repository+Startup+Thread n+ oak:index
1537963350142 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType <NAME> 
= nt:unstructured
1537963350142 Apache+Sling+Repository+Startup+Thread n+ socialLucene
1537963350142 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType <NAME> 
= oak:QueryIndexDefinition
1537963350142 Apache+Sling+Repository+Startup+Thread p+ compatVersion <LONG> = 2
1537963350142 Apache+Sling+Repository+Startup+Thread p+ name <STRING> = 
socialLucene
1537963350142 Apache+Sling+Repository+Startup+Thread p+ type <STRING> = lucene
1537963350142 Apache+Sling+Repository+Startup+Thread p+ async <STRINGS> = 
[async,nrt]
1537963350142 Apache+Sling+Repository+Startup+Thread p+ 
evaluatePathRestrictions <BOOLEAN> = true
1537963350142 Apache+Sling+Repository+Startup+Thread p+ reindex <BOOLEAN> = true
1537963350143 Apache+Sling+Repository+Startup+Thread n+ indexRules
1537963350143 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType <NAME> 
= nt:unstructured
1537963350143 Apache+Sling+Repository+Startup+Thread p+ :childOrder <NAMES> = 
[social:asiResource]
1537963350143 Apache+Sling+Repository+Startup+Thread n+ social:asiResource
1537963350143 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType <NAME> 
= nt:unstructured
1537963350143 Apache+Sling+Repository+Startup+Thread p+ :childOrder <NAMES> = 
[properties]{noformat}
where each line consists of a time stamp, the thread name, the operation (+ = 
added, - = removed, ^ = changed, ! = up to parent, n = node, p = property), the 
name (urlencoded except for : and / (for readability)), the type between angle 
brackets, and a value (urlencoded as well, and a comma-separated list between 
square brackets in case of multiple values). An 'n!' at the root node level 
ends a commit.


> CommitHook for recording write operations to the segment store
> --------------------------------------------------------------
>
>                 Key: OAK-7849
>                 URL: https://issues.apache.org/jira/browse/OAK-7849
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: segment-tar
>    Affects Versions: 1.9.9
>            Reporter: Axel Hanikel
>            Priority: Minor
>         Attachments: 
> 0001-OAK-7849-CommitHook-for-recording-write-operations-t.patch
>
>
> In order to increase reproducibility of tests which measure things like the 
> duration of operations or their latency, the idea is to record a log of the 
> changes committed to the segment store, which could later be replayed. That 
> replay is expected to produce the same results when run on the same machine 
> under the same conditions. That way, different versions of the segment store 
> can be compared more easily.
>  The log could look like this:
> {noformat}
> 1537963348079 FelixStartLevel n+ :clusterConfig
> 1537963348079 FelixStartLevel p+ :clusterId <STRING> = 
> bf462164-be56-4023-94ef-f8bafc3eb49f
> 1537963348079 FelixStartLevel n!
> 1537963348079 FelixStartLevel n!
> 1537963350142 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType 
> <NAME> = rep:root
> 1537963350142 Apache+Sling+Repository+Startup+Thread n+ oak:index
> 1537963350142 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType 
> <NAME> = nt:unstructured
> 1537963350142 Apache+Sling+Repository+Startup+Thread n+ socialLucene
> 1537963350142 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType 
> <NAME> = oak:QueryIndexDefinition
> 1537963350142 Apache+Sling+Repository+Startup+Thread p+ compatVersion <LONG> 
> = 2
> 1537963350142 Apache+Sling+Repository+Startup+Thread p+ name <STRING> = 
> socialLucene
> 1537963350142 Apache+Sling+Repository+Startup+Thread p+ type <STRING> = lucene
> 1537963350142 Apache+Sling+Repository+Startup+Thread p+ async <STRINGS> = 
> [async,nrt]
> 1537963350142 Apache+Sling+Repository+Startup+Thread p+ 
> evaluatePathRestrictions <BOOLEAN> = true
> 1537963350142 Apache+Sling+Repository+Startup+Thread p+ reindex <BOOLEAN> = 
> true
> 1537963350143 Apache+Sling+Repository+Startup+Thread n+ indexRules
> 1537963350143 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType 
> <NAME> = nt:unstructured
> 1537963350143 Apache+Sling+Repository+Startup+Thread p+ :childOrder <NAMES> = 
> [social:asiResource]
> 1537963350143 Apache+Sling+Repository+Startup+Thread n+ social:asiResource
> 1537963350143 Apache+Sling+Repository+Startup+Thread p+ jcr:primaryType 
> <NAME> = nt:unstructured
> 1537963350143 Apache+Sling+Repository+Startup+Thread p+ :childOrder <NAMES> = 
> [properties]{noformat}
> where each line consists of a time stamp, the thread name, the operation (+ = 
> added, - = removed, ^ = changed, ! = up to parent, n = node, p = property), 
> the name (urlencoded except for : and / (for readability)), the type between 
> angle brackets, and a value (urlencoded as well, and a comma-separated list 
> between square brackets in case of multiple values). An 'n!' at the root node 
> level ends a commit. Blob values are encoded as a simple string of bytes 
> converted to hex.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to