jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrei Dulceanu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-7659) AzureJournalWriter#truncate wrongly removes the journal file
Date Mon, 30 Jul 2018 09:17:00 GMT

    [ https://issues.apache.org/jira/browse/OAK-7659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16561670#comment-16561670
] 

Andrei Dulceanu commented on OAK-7659:
--------------------------------------

Thanks, [~tomek.rekawek] for reviewing it!

> AzureJournalWriter#truncate wrongly removes the journal file
> ------------------------------------------------------------
>
>                 Key: OAK-7659
>                 URL: https://issues.apache.org/jira/browse/OAK-7659
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segment-tar
>    Affects Versions: 1.9.6
>            Reporter: Andrei Dulceanu
>            Assignee: Andrei Dulceanu
>            Priority: Major
>         Attachments: OAK-7659.patch
>
>
> When running OffRC for an Azure Segment Store, compaction fails every time when trying
to write the new head in the journal file. Here are the relevant last lines from the log:
> {noformat}
> 07:34:16.490 [main] INFO  o.a.j.oak.segment.file.FileStore - TarMK GC #0: compaction
cycle 0 completed in 7.523 min (451351 ms). Compacted e077e35d-614d-4948-a577-4647340f6884.00000ac8
to d9b92653-01d7-4577-afff-b93a18b0799e.000018f9
> 07:34:16.538 [main] INFO  o.a.j.oak.segment.file.FileStore - TarMK GC #0: compaction
succeeded in 7.523 min (451399 ms), after 0 cycles
>     -> cleaning up
> 07:34:16.577 [main] INFO  o.a.j.oak.segment.file.FileStore - TarMK GC #0: cleanup started
using reclaimer (full generation older than 1.1, with 1 retained generations)
> 07:34:18.857 [main] INFO  o.a.j.oak.segment.file.FileStore - TarMK GC #0: cleanup marking
files for deletion: data00000a.tar,data00001a.tar,data00002a.tar,data00003a.tar,data00004a.tar,data00005a.tar,data00006a.tar,data00007a.tar
> 07:34:18.918 [main] INFO  o.a.j.oak.segment.file.FileStore - TarMK GC #0: cleanup completed
in 2.341 s (2340 ms). Post cleanup size is 1.7 GB (1688201323 bytes) and space reclaimed 2.0
GB (2033904890 bytes).
>     -> writing new journal.log: d9b92653-01d7-4577-afff-b93a18b0799e:6393 root 1532504059089
> 07:35:44.853 [main] INFO  o.a.j.oak.segment.file.FileStore - TarMK closed: /tmp/1532503601738-0
> {noformat}
> The complete stacktrace below:
> {noformat}
> java.io.IOException: com.microsoft.azure.storage.StorageException: The specified blob
does not exist.
>         at org.apache.jackrabbit.oak.segment.azure.AzureJournalFile$AzureJournalWriter.writeLine(AzureJournalFile.java:176)
>         at org.apache.jackrabbit.oak.segment.azure.tool.AzureCompact.run(AzureCompact.java:226)
>         at org.apache.jackrabbit.oak.run.CompactCommand.execute(CompactCommand.java:74)
>         at org.apache.jackrabbit.oak.run.Main.main(Main.java:49)
> Caused by: com.microsoft.azure.storage.StorageException: The specified blob does not
exist.
>         at com.microsoft.azure.storage.StorageException.translateFromHttpStatus(StorageException.java:175)
>         at com.microsoft.azure.storage.StorageException.translateException(StorageException.java:94)
>         at com.microsoft.azure.storage.core.StorageRequest.materializeException(StorageRequest.java:305)
>         at com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:175)
>         at com.microsoft.azure.storage.blob.CloudBlob.downloadAttributes(CloudBlob.java:1197)
>         at com.microsoft.azure.storage.blob.CloudAppendBlob.openOutputStreamInternal(CloudAppendBlob.java:904)
>         at com.microsoft.azure.storage.blob.CloudAppendBlob.openWriteExisting(CloudAppendBlob.java:794)
>         at com.microsoft.azure.storage.blob.CloudAppendBlob.append(CloudAppendBlob.java:560)
>         at com.microsoft.azure.storage.blob.CloudAppendBlob.appendFromByteArray(CloudAppendBlob.java:630)
>         at com.microsoft.azure.storage.blob.CloudAppendBlob.appendText(CloudAppendBlob.java:746)
>         at com.microsoft.azure.storage.blob.CloudAppendBlob.appendText(CloudAppendBlob.java:709)
>         at org.apache.jackrabbit.oak.segment.azure.AzureJournalFile$AzureJournalWriter.writeLine(AzureJournalFile.java:173)
>         ... 3 more
> {noformat}
> Relevant lines in {{AzureCompaction}} code are:
> {noformat}
> try (JournalFileWriter journalWriter = journal.openJournalWriter()) {
>   System.out.printf("    -> writing new %s: %s\n", journal.getName(), head);
>   journalWriter.truncate();
>   journalWriter.writeLine(head);
> }
> {noformat}
> Because in the current implementation, {{AzureJournalWriter}} just removes all internal
append blobs into which the journal is split, writing the new head always fails.



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

Mime
View raw message