[
https://issues.apache.org/jira/browse/OAK-4095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chetan Mehrotra updated OAK-4095:
---------------------------------
Attachment: OAK-4095.patch
[patch|^OAK-4095.patch] for the same requires just a minor change in line
written to journal file. Change is backward compatible as the {{JournalReader}}
reads the first column value and we just introduced a new column in the end.
Entries look like
{noformat}
9dc4eed1-63df-4dd0-a64a-0ccbf1802419:261952 root 1459418256056
48df5ed1-d4e7-4160-a5bb-2d67f8b0658f:221188 root 1459418261164
3cc912b5-b10d-44a0-a2ed-219e75e8644b:3640 root 1459418266307
b2479047-30a1-4db4-ae12-264ea8c89626:229880 root 1459418271461
21981dd6-6b83-45ea-a508-604967ad7113:64672 root 1459418276665
ffdae00b-8e41-4182-a9ab-a6c2a50001fc:255480 root 1459418281837
c4680ac1-7f55-422a-a1ae-cc9c7013d458:261272 root 1459418286978
af82df2c-2967-4d14-a361-06b35bdf7621:255848 root 1459418292085
{noformat}
[~mduerig] Can you review the patch?
> Include timestamp in journal log entries
> ----------------------------------------
>
> Key: OAK-4095
> URL: https://issues.apache.org/jira/browse/OAK-4095
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: segmentmk
> Reporter: Chetan Mehrotra
> Priority: Minor
> Labels: candidate_oak_1_0, candidate_oak_1_2, candidate_oak_1_4
> Fix For: 1.6
>
> Attachments: OAK-4095.patch
>
>
> Currently the journal log has entries like below. At times while debugging
> crash or some issue we need to determine the probable root state at some
> point in the past.
> {noformat}
> 3dea11bb-bd43-4319-a37d-59df778a7271:260988 root
> a7a509ac-a9d4-4e2c-a0d8-df71ebe123a0:259736 root
> 1d889da9-b41c-4889-a0cd-a9aa9dcc1737:259992 root
> b78e4aa6-ec68-4e70-a364-f04ccbf4c3b3:259964 root
> {noformat}
> Currently there is no way to determine from above log what is the root state
> wrt time. So we need to workaround that by reading each root state and look
> for some path which has some time related property. To simplify such case it
> would be helpful to also include timestamp while adding a journal entry
> {noformat}
> 1d889da9-b41c-4889-a0cd-a9aa9dcc1737:259992 root 1457408708772
> b78e4aa6-ec68-4e70-a364-f04ccbf4c3b3:259964 root 1457408708899
> {noformat}
> *Key points*
> # Timestamp comes at end
> # Such a feature can be enabled without affecting backward compatibility -
> Just that new entries would have timestamp included
> # {{JournalReader}} - Just reads the first column so would work as is
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)