[jira] [Commented] (OAK-8580) Stack trace logging for all binary downloading of cloud blob stores

2019-08-29 Thread Matt Ryan (Jira)


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

Matt Ryan commented on OAK-8580:


Fixed in 
[r1866061|https://svn.apache.org/viewvc?view=revision&revision=1866061].

> Stack trace logging for all binary downloading of cloud blob stores
> ---
>
> Key: OAK-8580
> URL: https://issues.apache.org/jira/browse/OAK-8580
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: blob-cloud, blob-cloud-azure
>Affects Versions: 1.16.0, 1.8.16
>Reporter: Alexander Klimetschek
>Assignee: Matt Ryan
>Priority: Major
> Attachments: OAK-8580.patch
>
>
> We want to be able to trace application code that invokes 
> Binary.getInputStream() when a cloud blob store is present.
> The Azure blob store has one place where it supports trace logging 
> [here|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java#L1202-L1207],
>  but this misses another place blobs are fetched in 
> [read()|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java#L218].
> Furthermore, it would be nice to have a separate logger for that in order to 
> create a log file that _only_ includes these stack traces, and no other debug 
> logs of the AzureBackend class.
> And same for the S3 BlobStore implementation.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Commented] (OAK-8580) Stack trace logging for all binary downloading of cloud blob stores

2019-08-28 Thread Matt Ryan (Jira)


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

Matt Ryan commented on OAK-8580:


I created a PR for review 
[here|https://github.com/apache/jackrabbit-oak/pull/147] - 
[~alexander.klimetschek] if you have a chance to take a look and see if this 
matches what you had in mind.

> Stack trace logging for all binary downloading of cloud blob stores
> ---
>
> Key: OAK-8580
> URL: https://issues.apache.org/jira/browse/OAK-8580
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: blob-cloud, blob-cloud-azure
>Affects Versions: 1.16.0, 1.8.16
>Reporter: Alexander Klimetschek
>Assignee: Matt Ryan
>Priority: Major
> Attachments: OAK-8580.patch
>
>
> We want to be able to trace application code that invokes 
> Binary.getInputStream() when a cloud blob store is present.
> The Azure blob store has one place where it supports trace logging 
> [here|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java#L1202-L1207],
>  but this misses another place blobs are fetched in 
> [read()|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java#L218].
> Furthermore, it would be nice to have a separate logger for that in order to 
> create a log file that _only_ includes these stack traces, and no other debug 
> logs of the AzureBackend class.
> And same for the S3 BlobStore implementation.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Commented] (OAK-8580) Stack trace logging for all binary downloading of cloud blob stores

2019-08-28 Thread Matt Ryan (Jira)


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

Matt Ryan commented on OAK-8580:


[~alexander.klimetschek] - I can go ahead with the addition of the stream 
loggers in {{AzureDataStore}} and {{S3DataStore}}.  I think if we want the JCR 
path in the logs that merits a separate issue with further discussion.  The 
fact that we reference blobs by blob ID indicates an intentional layer of 
abstraction between the node path and the blob itself, allowing to treat each 
as separate.  I'm not sure we want to undo that by exposing the JCR path to the 
data store even if it is just for the purpose of logging it.  We'd need some 
further discussion with the larger group - which is why I suggest a separate 
issue.

> Stack trace logging for all binary downloading of cloud blob stores
> ---
>
> Key: OAK-8580
> URL: https://issues.apache.org/jira/browse/OAK-8580
> Project: Jackrabbit Oak
>  Issue Type: Improvement
>  Components: blob-cloud, blob-cloud-azure
>Affects Versions: 1.16.0, 1.8.16
>Reporter: Alexander Klimetschek
>Assignee: Matt Ryan
>Priority: Major
> Attachments: OAK-8580.patch
>
>
> We want to be able to trace application code that invokes 
> Binary.getInputStream() when a cloud blob store is present.
> The Azure blob store has one place where it supports trace logging 
> [here|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java#L1202-L1207],
>  but this misses another place blobs are fetched in 
> [read()|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java#L218].
> Furthermore, it would be nice to have a separate logger for that in order to 
> create a log file that _only_ includes these stack traces, and no other debug 
> logs of the AzureBackend class.
> And same for the S3 BlobStore implementation.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Commented] (OAK-8580) Stack trace logging for all binary downloading of cloud blob stores

2019-08-27 Thread Alexander Klimetschek (Jira)


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

Alexander Klimetschek commented on OAK-8580:


A few more thoughts based on practical usage of the above patch:
 * it logs downloading of {{reference.key}} which could probably be filtered out
 * since this is in the BlobStore impl, this will only log once, but then it's 
in the DS cache, and thus the code is not called again. this seems like a 
feature, as it reduces the log output a lot. and the goal of the log output is 
to get the unique stack traces, not every single invocation.
 * we cannot see the JCR path in the logs, which would be extremely helpful. 
there is typically the GET /some/url in the log output as part of the thread 
name, which helps to some degree, but not always.

it is not trivial because down in the blob store the knowledge of the binary 
has been lost. but maybe there is a trick to add it, for example by updating 
the thread name somewhere higher up the stack where we retrieve the binary:

{code:java}
Thread.currentThread().setName(Thread.currentThread().getName() + " (jcr path: 
" + jcrPath + ")"); {code}

> Stack trace logging for all binary downloading of cloud blob stores
> ---
>
> Key: OAK-8580
> URL: https://issues.apache.org/jira/browse/OAK-8580
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: blob-cloud, blob-cloud-azure
>Affects Versions: 1.16.0, 1.8.16
>Reporter: Alexander Klimetschek
>Assignee: Matt Ryan
>Priority: Major
> Attachments: OAK-8580.patch
>
>
> We want to be able to trace application code that invokes 
> Binary.getInputStream() when a cloud blob store is present.
> The Azure blob store has one place where it supports trace logging 
> [here|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java#L1202-L1207],
>  but this misses another place blobs are fetched in 
> [read()|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java#L218].
> Furthermore, it would be nice to have a separate logger for that in order to 
> create a log file that _only_ includes these stack traces, and no other debug 
> logs of the AzureBackend class.
> And same for the S3 BlobStore implementation.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Commented] (OAK-8580) Stack trace logging for all binary downloading of cloud blob stores

2019-08-27 Thread Alexander Klimetschek (Jira)


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

Alexander Klimetschek commented on OAK-8580:


Here is a patch for the AzureBlobStoreBackend:  [^OAK-8580.patch]

This adds a new logger "oak.datastore.download.streams" to make it separate 
from the existing logger based on the class. The same name could be used in the 
S3 BlobStore implementation. Better name welcome.

> Stack trace logging for all binary downloading of cloud blob stores
> ---
>
> Key: OAK-8580
> URL: https://issues.apache.org/jira/browse/OAK-8580
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: blob-cloud, blob-cloud-azure
>Affects Versions: 1.16.0, 1.8.16
>Reporter: Alexander Klimetschek
>Assignee: Matt Ryan
>Priority: Major
> Attachments: OAK-8580.patch
>
>
> We want to be able to trace application code that invokes 
> Binary.getInputStream() when a cloud blob store is present.
> The Azure blob store has one place where it supports trace logging 
> [here|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java#L1202-L1207],
>  but this misses another place blobs are fetched in 
> [read()|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java#L218].
> Furthermore, it would be nice to have a separate logger for that in order to 
> create a log file that _only_ includes these stack traces, and no other debug 
> logs of the AzureBackend class.
> And same for the S3 BlobStore implementation.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)