[jira] Created: (JCR-2197) Support configuration of timeout in Statements for Database implementations

6 messages Options
Embed this post
Permalink
JIRA jira@apache.org

[jira] Created: (JCR-2197) Support configuration of timeout in Statements for Database implementations

Reply Threaded More More options
Print post
Permalink
Support configuration of timeout in Statements for Database implementations
---------------------------------------------------------------------------

                 Key: JCR-2197
                 URL: https://issues.apache.org/jira/browse/JCR-2197
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: locks
    Affects Versions: 1.5.6
            Reporter: Micah Whitacre


Allowing for the configuration and usage of a timeout value for Statements[1] would provide a means avoiding dead lock when a long running/stalled SQL Statement holds onto a lock preventing other threads from acquiring locks.  

The situation i have seen is where a JVM handling multiple request each in its own Thread will at some points become stalled.  At the start of each thread processing the request it will acquire its own session to the repository which stores all information in an an Oracle database.  The issue we are seeing is that deadlock occurs because the SQL write statement to the VersionManager is taking too long/stalling in the Oracle driver code.  Since it is writing, the write lock is acquired and this prevents other threads from acquiring a session because they get blocked trying to acquire the read lock of the Version Manager.

If the SQL statement timed out after a certain time, this would alleviate the problem of threads continually hanging and make use of the Jackrabbit auto reconnect functionality.  The user of timeout is supported when using JNDI so this request would move it towards being first class support on the database implementations.

[1] - http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#setQueryTimeout(int)
[2] - http://forums.sun.com/thread.jspa?threadID=343023&start=30&tstart=0

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Updated: (JCR-2197) Support configuration of timeout in Statements for Database implementations

Reply Threaded More More options
Print post
Permalink

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

Stefan Guggisberg updated JCR-2197:
-----------------------------------

    Component/s:     (was: locks)
                 jackrabbit-core
       Priority: Minor  (was: Major)
     Issue Type: New Feature  (was: Bug)

adjusting issue type, priority and component

> Support configuration of timeout in Statements for Database implementations
> ---------------------------------------------------------------------------
>
>                 Key: JCR-2197
>                 URL: https://issues.apache.org/jira/browse/JCR-2197
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-core
>    Affects Versions: 1.5.6
>            Reporter: Micah Whitacre
>            Priority: Minor
>
> Allowing for the configuration and usage of a timeout value for Statements[1] would provide a means avoiding dead lock when a long running/stalled SQL Statement holds onto a lock preventing other threads from acquiring locks.  
> The situation i have seen is where a JVM handling multiple request each in its own Thread will at some points become stalled.  At the start of each thread processing the request it will acquire its own session to the repository which stores all information in an an Oracle database.  The issue we are seeing is that deadlock occurs because the SQL write statement to the VersionManager is taking too long/stalling in the Oracle driver code.  Since it is writing, the write lock is acquired and this prevents other threads from acquiring a session because they get blocked trying to acquire the read lock of the Version Manager.
> If the SQL statement timed out after a certain time, this would alleviate the problem of threads continually hanging and make use of the Jackrabbit auto reconnect functionality.  The user of timeout is supported when using JNDI so this request would move it towards being first class support on the database implementations.
> [1] - http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#setQueryTimeout(int)
> [2] - http://forums.sun.com/thread.jspa?threadID=343023&start=30&tstart=0

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Commented: (JCR-2197) Support configuration of timeout in Statements for Database implementations

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/JCR-2197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729077#action_12729077 ]

Stefan Guggisberg commented on JCR-2197:
----------------------------------------

is the suggested new feature meant as a work-around for an oracle jdbc driver issue?

> Support configuration of timeout in Statements for Database implementations
> ---------------------------------------------------------------------------
>
>                 Key: JCR-2197
>                 URL: https://issues.apache.org/jira/browse/JCR-2197
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-core
>    Affects Versions: 1.5.6
>            Reporter: Micah Whitacre
>            Priority: Minor
>
> Allowing for the configuration and usage of a timeout value for Statements[1] would provide a means avoiding dead lock when a long running/stalled SQL Statement holds onto a lock preventing other threads from acquiring locks.  
> The situation i have seen is where a JVM handling multiple request each in its own Thread will at some points become stalled.  At the start of each thread processing the request it will acquire its own session to the repository which stores all information in an an Oracle database.  The issue we are seeing is that deadlock occurs because the SQL write statement to the VersionManager is taking too long/stalling in the Oracle driver code.  Since it is writing, the write lock is acquired and this prevents other threads from acquiring a session because they get blocked trying to acquire the read lock of the Version Manager.
> If the SQL statement timed out after a certain time, this would alleviate the problem of threads continually hanging and make use of the Jackrabbit auto reconnect functionality.  The user of timeout is supported when using JNDI so this request would move it towards being first class support on the database implementations.
> [1] - http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#setQueryTimeout(int)
> [2] - http://forums.sun.com/thread.jspa?threadID=343023&start=30&tstart=0

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Commented: (JCR-2197) Support configuration of timeout in Statements for Database implementations

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/JCR-2197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729080#action_12729080 ]

Jukka Zitting commented on JCR-2197:
------------------------------------

Let me guess: you're versioning large binaries without a data store?

> Support configuration of timeout in Statements for Database implementations
> ---------------------------------------------------------------------------
>
>                 Key: JCR-2197
>                 URL: https://issues.apache.org/jira/browse/JCR-2197
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-core
>    Affects Versions: 1.5.6
>            Reporter: Micah Whitacre
>            Priority: Minor
>
> Allowing for the configuration and usage of a timeout value for Statements[1] would provide a means avoiding dead lock when a long running/stalled SQL Statement holds onto a lock preventing other threads from acquiring locks.  
> The situation i have seen is where a JVM handling multiple request each in its own Thread will at some points become stalled.  At the start of each thread processing the request it will acquire its own session to the repository which stores all information in an an Oracle database.  The issue we are seeing is that deadlock occurs because the SQL write statement to the VersionManager is taking too long/stalling in the Oracle driver code.  Since it is writing, the write lock is acquired and this prevents other threads from acquiring a session because they get blocked trying to acquire the read lock of the Version Manager.
> If the SQL statement timed out after a certain time, this would alleviate the problem of threads continually hanging and make use of the Jackrabbit auto reconnect functionality.  The user of timeout is supported when using JNDI so this request would move it towards being first class support on the database implementations.
> [1] - http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#setQueryTimeout(int)
> [2] - http://forums.sun.com/thread.jspa?threadID=343023&start=30&tstart=0

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Commented: (JCR-2197) Support configuration of timeout in Statements for Database implementations

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/JCR-2197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729229#action_12729229 ]

Micah Whitacre commented on JCR-2197:
-------------------------------------

I do not have a data store configured and am storing xml documents that are generally about 10-50k.  In a few rare cases the files size is as large as 250k.  I remember looking at a data store at a previous point but can't remember why I decided to not use it.  Does a data store play nicely in a clustered environment?  In my example in the initial description I have multiple JVMs each with its own repository but pointing at the same set of tables in the database.

The suggested feature is simply meant to give jackrabbit a bit more robustness in situations where it is controlling the connections with the database.  

> Support configuration of timeout in Statements for Database implementations
> ---------------------------------------------------------------------------
>
>                 Key: JCR-2197
>                 URL: https://issues.apache.org/jira/browse/JCR-2197
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-core
>    Affects Versions: 1.5.6
>            Reporter: Micah Whitacre
>            Priority: Minor
>
> Allowing for the configuration and usage of a timeout value for Statements[1] would provide a means avoiding dead lock when a long running/stalled SQL Statement holds onto a lock preventing other threads from acquiring locks.  
> The situation i have seen is where a JVM handling multiple request each in its own Thread will at some points become stalled.  At the start of each thread processing the request it will acquire its own session to the repository which stores all information in an an Oracle database.  The issue we are seeing is that deadlock occurs because the SQL write statement to the VersionManager is taking too long/stalling in the Oracle driver code.  Since it is writing, the write lock is acquired and this prevents other threads from acquiring a session because they get blocked trying to acquire the read lock of the Version Manager.
> If the SQL statement timed out after a certain time, this would alleviate the problem of threads continually hanging and make use of the Jackrabbit auto reconnect functionality.  The user of timeout is supported when using JNDI so this request would move it towards being first class support on the database implementations.
> [1] - http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#setQueryTimeout(int)
> [2] - http://forums.sun.com/thread.jspa?threadID=343023&start=30&tstart=0

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Commented: (JCR-2197) Support configuration of timeout in Statements for Database implementations

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/JCR-2197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729258#action_12729258 ]

Thomas Mueller commented on JCR-2197:
-------------------------------------

> Does a data store play nicely in a clustered environment?

Yes.

> generally about 10-50k

Binaries of this size may or may not benefit from using a data store. I would try.

> Support configuration of timeout in Statements for Database implementations
> ---------------------------------------------------------------------------
>
>                 Key: JCR-2197
>                 URL: https://issues.apache.org/jira/browse/JCR-2197
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: jackrabbit-core
>    Affects Versions: 1.5.6
>            Reporter: Micah Whitacre
>            Priority: Minor
>
> Allowing for the configuration and usage of a timeout value for Statements[1] would provide a means avoiding dead lock when a long running/stalled SQL Statement holds onto a lock preventing other threads from acquiring locks.  
> The situation i have seen is where a JVM handling multiple request each in its own Thread will at some points become stalled.  At the start of each thread processing the request it will acquire its own session to the repository which stores all information in an an Oracle database.  The issue we are seeing is that deadlock occurs because the SQL write statement to the VersionManager is taking too long/stalling in the Oracle driver code.  Since it is writing, the write lock is acquired and this prevents other threads from acquiring a session because they get blocked trying to acquire the read lock of the Version Manager.
> If the SQL statement timed out after a certain time, this would alleviate the problem of threads continually hanging and make use of the Jackrabbit auto reconnect functionality.  The user of timeout is supported when using JNDI so this request would move it towards being first class support on the database implementations.
> [1] - http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#setQueryTimeout(int)
> [2] - http://forums.sun.com/thread.jspa?threadID=343023&start=30&tstart=0

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.