You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org> on 2006/02/21 14:39:24 UTC

[jira] Created: (DERBY-1014) Make tests less sensitive to pre-fetching

Make tests less sensitive to pre-fetching
-----------------------------------------

         Key: DERBY-1014
         URL: http://issues.apache.org/jira/browse/DERBY-1014
     Project: Derby
        Type: Sub-task
  Components: Test  
    Reporter: Knut Anders Hatlen
 Assigned to: Knut Anders Hatlen 
    Priority: Minor


Some tests are very sensitive to changes in pre-fetching, either
because they call SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS() which
displays the number of rows seen, or because a failure that normally
is exposed when calling ResultSet.next() is exposed when calling
Statement.execute().

Most of these tests are not testing when or how much data is
pre-fetched. If we make the tests less sensitive to pre-fetching, it
is easier to catch the real regressions when changing the way Derby is
pre-fetching data. Also, patches in that area of the code will be
smaller (fewer test changes) and easier to review.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (DERBY-1014) Make tests less sensitive to pre-fetching

Posted by Bryan Pendleton <bp...@amberpoint.com>.
>> Bryan, as far as I have understood, this JIRA is not about the actual
>> pre-fetching, but about fixing the tests so that they are not broken
>> when prefetching is introduced.  Prefetching is covered by DERBY-822.

Thanks! I knew this once, but had forgotten.

I'm still quite interested in the whole pre-fetching topic, and I suspect
I may learn quite a bit by studying the tests, as it's interesting to me
to consider how the external behavior of the system, as reflected in the
tests, is changed via the pre-fetching. So seeing where the prefetching
changes interacted with tests which proved sensitive to prefetching, is
an interesting eye into this new behavior.

Plus I need to learn more about the tests in general, so taking the
opportunity to study patches to them is good exercise.

But I've been quite busy with some other issues recently, so please don't
hold up this issue on my behalf. I'll continue to follow it as you go.

thanks,

bryan



Re: [jira] Commented: (DERBY-1014) Make tests less sensitive to pre-fetching

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Øystein Grøvlen <Oy...@Sun.COM> writes:

> Bryan, as far as I have understood, this JIRA is not about the actual
> pre-fetching, but about fixing the tests so that they are not broken
> when prefetching is introduced.  Prefetching is covered by DERBY-822.

That's correct. I posted a patch for DERBY-822, but the updating of
canons made the patch so big that I was advised to make the test
changes independent of the code changes. I wanted to wait before
committing the test changes so that the community got the chance to
have a look at the patch and tell me if the changes would remove
output that was relevant for the tests.

When the test patch is committed I will submit a new and much smaller
patch for DERBY-822.

> --
> Øystein
>
> Bryan Pendleton wrote:
>> Knut Anders Hatlen (JIRA) wrote:
>> 
>>>     [
>>> http://issues.apache.org/jira/browse/DERBY-1014?page=comments#action_12370687
>>> ]
>>> I plan to commit this patch next week if I don't get any comments.
>> I started looking at this patch when you first posted it, but got
>> distracted by a few other issues.
>> What I saw looked good, though.
>> I would like to understand the pre-fetching behaviors better, so I
>> do
>> intend to look at your changes some more.
>> But I don't think you should delay your commit on my behalf; any
>> questions
>> I have can be resolved post-commit.
>> thanks,
>> bryan
>> 

-- 
Knut Anders

Re: [jira] Commented: (DERBY-1014) Make tests less sensitive to pre-fetching

Posted by Øystein Grøvlen <Oy...@Sun.COM>.
Bryan, as far as I have understood, this JIRA is not about the actual 
pre-fetching, but about fixing the tests so that they are not broken 
when prefetching is introduced.  Prefetching is covered by DERBY-822.

--
Øystein

Bryan Pendleton wrote:
> Knut Anders Hatlen (JIRA) wrote:
> 
>>     [ 
>> http://issues.apache.org/jira/browse/DERBY-1014?page=comments#action_12370687 
>> ]
>> I plan to commit this patch next week if I don't get any comments.
> 
> 
> I started looking at this patch when you first posted it, but got
> distracted by a few other issues.
> 
> What I saw looked good, though.
> 
> I would like to understand the pre-fetching behaviors better, so I do
> intend to look at your changes some more.
> 
> But I don't think you should delay your commit on my behalf; any questions
> I have can be resolved post-commit.
> 
> thanks,
> 
> bryan
> 


Re: [jira] Commented: (DERBY-1014) Make tests less sensitive to pre-fetching

Posted by Bryan Pendleton <bp...@amberpoint.com>.
Knut Anders Hatlen (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/DERBY-1014?page=comments#action_12370687 ] 
> 
> I plan to commit this patch next week if I don't get any comments.

I started looking at this patch when you first posted it, but got
distracted by a few other issues.

What I saw looked good, though.

I would like to understand the pre-fetching behaviors better, so I do
intend to look at your changes some more.

But I don't think you should delay your commit on my behalf; any questions
I have can be resolved post-commit.

thanks,

bryan


[jira] Commented: (DERBY-1014) Make tests less sensitive to pre-fetching

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1014?page=comments#action_12370687 ] 

Knut Anders Hatlen commented on DERBY-1014:
-------------------------------------------

I plan to commit this patch next week if I don't get any comments.

> Make tests less sensitive to pre-fetching
> -----------------------------------------
>
>          Key: DERBY-1014
>          URL: http://issues.apache.org/jira/browse/DERBY-1014
>      Project: Derby
>         Type: Sub-task
>   Components: Test
>     Reporter: Knut Anders Hatlen
>     Assignee: Knut Anders Hatlen
>     Priority: Minor
>  Attachments: DERBY-1014-v1.diff, DERBY-1014-v1.stat
>
> Some tests are very sensitive to changes in pre-fetching, either
> because they call SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS() which
> displays the number of rows seen, or because a failure that normally
> is exposed when calling ResultSet.next() is exposed when calling
> Statement.execute().
> Most of these tests are not testing when or how much data is
> pre-fetched. If we make the tests less sensitive to pre-fetching, it
> is easier to catch the real regressions when changing the way Derby is
> pre-fetching data. Also, patches in that area of the code will be
> smaller (fewer test changes) and easier to review.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DERBY-1014) Make tests less sensitive to pre-fetching

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1014?page=all ]
     
Knut Anders Hatlen closed DERBY-1014:
-------------------------------------

    Fix Version: 10.2.0.0
     Resolution: Fixed

Committed revision 387214.

> Make tests less sensitive to pre-fetching
> -----------------------------------------
>
>          Key: DERBY-1014
>          URL: http://issues.apache.org/jira/browse/DERBY-1014
>      Project: Derby
>         Type: Sub-task
>   Components: Test
>     Reporter: Knut Anders Hatlen
>     Assignee: Knut Anders Hatlen
>     Priority: Minor
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1014-v1.diff, DERBY-1014-v1.stat
>
> Some tests are very sensitive to changes in pre-fetching, either
> because they call SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS() which
> displays the number of rows seen, or because a failure that normally
> is exposed when calling ResultSet.next() is exposed when calling
> Statement.execute().
> Most of these tests are not testing when or how much data is
> pre-fetched. If we make the tests less sensitive to pre-fetching, it
> is easier to catch the real regressions when changing the way Derby is
> pre-fetching data. Also, patches in that area of the code will be
> smaller (fewer test changes) and easier to review.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1014) Make tests less sensitive to pre-fetching

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1014?page=all ]

Knut Anders Hatlen updated DERBY-1014:
--------------------------------------

    Attachment: DERBY-1014-v1.diff
                DERBY-1014-v1.stat

Attached a patch (DERBY-1014-v1.diff) which modifies tests in
preparation for DERBY-822. There are two types of changes:

  1) Invoke ResultSet.next() to expose error even when the driver
     isn't pre-fetching data.

  2) Filter out some of the run-time statistics before comparing with
     the canon.

Please note that one 'svn add' and two 'svn delete' commands are
required (see DERBY-1014-v1.stat), and probably 'ant clobber' as well.

I have run derbyall successfully (failures also seen in nightly
regression tests) on Sun JVM 1.4.2/Solaris 10 x86.

lang/wisconsin.java:

  * Added patterns to the sed file. Cursor names and some of the
    run-time statistics are filtered out.

  * Canons for DerbyNet and DerbyNetClient were deleted since they are
    no longer needed. Each of these files is 1.5M, so the diff is
    huge.

lang/scrollCursors1.sql:

  * Added patterns to the sed file. Number of rows seen and number of
    reads from hash table will be filtered out.

jdbcapi/parameterMetaDataJdbc30.java:

  * Added a call to ResultSet.next() to provoke an error in a test
    case for DERBY-44 regardless of framework/pre-fetching.

jdbcapi/resultset.java:

  * Don't print column headers until one row is successfully retrieved
    (achieved by calling ResultSet.next() earlier).

jdbcapi/setTransactionIsolation.java:

  * Added a call to ResultSet.next() to provoke a timeout regardless
    of framework/pre-fetching.

  * Added patterns to the sed file. Filtered out number of pages
    visited, number of rows qualified/visited etc.

> Make tests less sensitive to pre-fetching
> -----------------------------------------
>
>          Key: DERBY-1014
>          URL: http://issues.apache.org/jira/browse/DERBY-1014
>      Project: Derby
>         Type: Sub-task
>   Components: Test
>     Reporter: Knut Anders Hatlen
>     Assignee: Knut Anders Hatlen
>     Priority: Minor
>  Attachments: DERBY-1014-v1.diff, DERBY-1014-v1.stat
>
> Some tests are very sensitive to changes in pre-fetching, either
> because they call SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS() which
> displays the number of rows seen, or because a failure that normally
> is exposed when calling ResultSet.next() is exposed when calling
> Statement.execute().
> Most of these tests are not testing when or how much data is
> pre-fetched. If we make the tests less sensitive to pre-fetching, it
> is easier to catch the real regressions when changing the way Derby is
> pre-fetching data. Also, patches in that area of the code will be
> smaller (fewer test changes) and easier to review.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1014) Make tests less sensitive to pre-fetching

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1014?page=all ]

Knut Anders Hatlen updated DERBY-1014:
--------------------------------------

    Other Info: [Patch available]

> Make tests less sensitive to pre-fetching
> -----------------------------------------
>
>          Key: DERBY-1014
>          URL: http://issues.apache.org/jira/browse/DERBY-1014
>      Project: Derby
>         Type: Sub-task
>   Components: Test
>     Reporter: Knut Anders Hatlen
>     Assignee: Knut Anders Hatlen
>     Priority: Minor
>  Attachments: DERBY-1014-v1.diff, DERBY-1014-v1.stat
>
> Some tests are very sensitive to changes in pre-fetching, either
> because they call SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS() which
> displays the number of rows seen, or because a failure that normally
> is exposed when calling ResultSet.next() is exposed when calling
> Statement.execute().
> Most of these tests are not testing when or how much data is
> pre-fetched. If we make the tests less sensitive to pre-fetching, it
> is easier to catch the real regressions when changing the way Derby is
> pre-fetching data. Also, patches in that area of the code will be
> smaller (fewer test changes) and easier to review.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira