You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@madlib.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/08/06 02:30:00 UTC

[jira] [Commented] (MADLIB-1014) SVM: Install-check fails in PG 9.5 due to CV

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

ASF GitHub Bot commented on MADLIB-1014:
----------------------------------------

GitHub user iyerr3 opened a pull request:

    https://github.com/apache/madlib/pull/307

    Two CV-related changes

    This PR includes two commits. 
    
    First is a fix related to issue MADLIB-1014 that led to a "cache lookup" error when the install-check schema is deleted. 
    
    Second is refactoring of internal/cross_validation. CV had an inconsistent API that led to failure with either elastic_net or SVM. This commit simplifies the API and makes it consistent. 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/madlib/madlib feature/refactor_internal_cv

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/madlib/pull/307.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #307
    
----
commit a897960972d021568d424d4f0557291c1a4ac2e5
Author: Rahul Iyer <ri...@...>
Date:   2018-08-06T02:18:48Z

    Madpack: Duplicate DROP SCHEMA due to invalid cache
    
    JIRA: MADLIB-1014
    
    We've intermittently noticed a "cache lookup failure" due to a
    "DROP OWNED BY". This was noticed only with CV enabled, possibly due to
    the excessive number of tables created by CV.
    
    This could be related to an error on StackExchange:
    https://dba.stackexchange.com/questions/173815/redshift-internalerror-cache-lookup-failed-for-relation
    
    An excerpt from the issue: "The problem is on the Postgres DB engine
    caching is something to do with the System Catalog Cache access. ... the
    issue gets reproduced when DROP is used very often and the cache is not
    able to retrieve data which seems to be out-of-sync. After sometime (few
    seconds) the cache is in back in sync and query runs fine. The only
    workaround I see for the moment is retry query when fail ..."
    
    To get around this issue, we duplicate the "DROP CASCADE" call after a
    delay with the hope that the second call will clear the schema without
    an issue.

commit 660291574e315f0a0873836dc94110d1ae715f1b
Author: Rahul Iyer <ri...@...>
Date:   2018-08-06T02:18:32Z

    CV: Simplify and fix internal CV requirements
    
    This commit ensures internal cross validation API is consistent and
    simplifies the arguments for CV parameters.
    
    Closes #306

----


> SVM: Install-check fails in PG 9.5 due to CV
> --------------------------------------------
>
>                 Key: MADLIB-1014
>                 URL: https://issues.apache.org/jira/browse/MADLIB-1014
>             Project: Apache MADlib
>          Issue Type: Bug
>          Components: Module: Support Vector Machines
>            Reporter: Rahul Iyer
>            Assignee: Nandish Jayaram
>            Priority: Minor
>             Fix For: v1.10
>
>
> Cross validation in SVM leads to failures in PG 9.5
> {code}
> madpack.py : INFO : Detected PostgreSQL version 9.5.
> madpack.py : ERROR : Failed executing /tmp/madlib.MHNKQS/svm/test/svm.sql_in.tmp
> madpack.py : ERROR : Check the log at /tmp/madlib.MHNKQS/svm/test/svm.sql_in.log
> TEST CASE RESULT|Module: svm|svm.sql_in|FAIL|Time: 4251 milliseconds
> madpack.py : ERROR : SQL command failed:
> SQL: DROP SCHEMA IF EXISTS madlib_installcheck_svm CASCADE;
> psql: FATAL:  the database system is in recovery mode
> Traceback (most recent call last):
>   File "/Users/riyer/Work/MADlib/madlib_builds/build_pg_2/src/bin/../madpack/madpack.py", line 1365, in <module>
>     main(sys.argv[1:])
>   File "/Users/riyer/Work/MADlib/madlib_builds/build_pg_2/src/bin/../madpack/madpack.py", line 1352, in main
>     _internal_run_query("DROP SCHEMA IF EXISTS %s CASCADE;" % (test_schema), True)
>   File "/Users/riyer/Work/MADlib/madlib_builds/build_pg_2/src/bin/../madpack/madpack.py", line 176, in _internal_run_query
>     return run_query(sql, show_error, con_args)
>   File "/Users/riyer/Work/MADlib/madlib_builds/build_pg_2/src/bin/../madpack/madpack.py", line 141, in run_query
>     raise Exception
> Exception
> {code}
> The install-check fails in PG 9.4 as well but the database does not go into recovery mode. Rather the error occurs when the install-check schema is getting cleaned. 
> {code}
> madpack.py : INFO : Detected PostgreSQL version 9.4.
> TEST CASE RESULT|Module: svm|svm.sql_in|PASS|Time: 5591 milliseconds
> madpack.py : ERROR : SQL command failed:
> SQL: DROP OWNED BY madlib_191dev_installcheck CASCADE;
> ERROR:  could not open relation with OID 860224
> Traceback (most recent call last):
>   File "/Users/riyer/Work/MADlib/madlib_builds/build_pg_2/src/bin/../madpack/madpack.py", line 1365, in <module>
>     main(sys.argv[1:])
>   File "/Users/riyer/Work/MADlib/madlib_builds/build_pg_2/src/bin/../madpack/madpack.py", line 1355, in main
>     _internal_run_query("DROP OWNED BY %s CASCADE;" % (test_user), True)
>   File "/Users/riyer/Work/MADlib/madlib_builds/build_pg_2/src/bin/../madpack/madpack.py", line 176, in _internal_run_query
>     return run_query(sql, show_error, con_args)
>   File "/Users/riyer/Work/MADlib/madlib_builds/build_pg_2/src/bin/../madpack/madpack.py", line 141, in run_query
>     raise Exception
> Exception
> {code}
> Commenting out the cross validation function calls leads to successful install-check
> {code}
> madpack.py : INFO : Detected PostgreSQL version 9.4.
> TEST CASE RESULT|Module: svm|svm.sql_in|PASS|Time: 2887 milliseconds
> {code}
> {code}
> madpack.py : INFO : Detected PostgreSQL version 9.5.
> TEST CASE RESULT|Module: svm|svm.sql_in|PASS|Time: 3056 milliseconds
> {code}



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