Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-7849

CommitHook for recording write operations to the segment store

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.9
    • 1.10.0, 1.9.10
    • segment-tar
    • None

    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:

      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]

      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.

      Attachments

        Activity

          People

            frm Francesco Mari
            ahanikel Axel Hanikel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: