Changes between Version 1 and Version 2 of Ticket #4684, comment 14


Ignore:
Timestamp:
Jul 14, 2020, 11:43:04 PM (4 years ago)
Author:
Lars Aksel Opsahl

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4684, comment 14

    v1 v2  
    1 First I create a empty database
     1This does not lock like bug in Postgis Topology bug it was bug was related to missing primary key , I have now been running 60 interatins with no errors. The new correct SQL is uploaded.
    22
    3 {{{
    4 psql postgres -c'create database t1'
    5 }}}
    6 
    7 Then add code and data needed for testing. The code is created from [https://github.com/larsop/resolve-overlap-and-gap/tree/trac_osgeo_org_postgis_ticket_4684] latest commit at July 10.
    8 
    9 {{{
    10 psql t1 -f db_topo_bug_4684_init.sql
    11 }}}
    12 
    13 In the tests below we break input up lines that do not intersects any cell border and insert them into topology layer.
    14 There is only thread working at each cell at the same time
    15 
    16 Tested on
    17 
    18 
    19 {{{
    20 SELECT PostGIS_Full_Version();
    21                                                                postgis_full_version                                                               
    22 --------------------------------------------------------------------------------------------------------------------------------------------------
    23  POSTGIS="3.1.0dev 3.1.0alpha1-144-g50796cc" [EXTENSION] PGSQL="120" GEOS="3.8.1-CAPI-1.13.3" PROJ="7.0.1" LIBXML="2.9.1" LIBJSON="0.11" TOPOLOGY
    24 (1 row)
    25 
    26 SELECT PostGIS_Full_Version();
    27                                                                              postgis_full_version                                                                             
    28 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    29  POSTGIS="3.0.0 r17983" [EXTENSION] PGSQL="120" GEOS="3.8.0-CAPI-1.13.1 " PROJ="6.3.0" LIBXML="2.9.10" LIBJSON="0.13.1" LIBPROTOBUF="1.3.2" WAGYU="0.4.3 (Internal)" TOPOLOGY
    30 (1 row)
    31 
    32 }}}
    33 
    34 
    35 In this I run 4 threads in parallel (With parallel I have tests showing that it run more than 10 times faster, than using a single thread)
    36 I have got it to fail on mac a (with 2 dual core cpu) and Dell server (with 16 dual core cpu).
    37 It may fail after 1 or after or 20 loops and it to be seems totally random where in the map the error happens
    38 I have seen max 3 topo errors and they can occur in in cells not spatially not connected.
    39 
    40 FAILING test : db_topo_bug_4684_test_fail.sql
    41 
    42 
    43 {{{
    44 time psql t1 -f db_topo_bug_4684_test_fail.sql 2>&1|tee db_topo_bug_4684_test_fail.log
    45 
    46 PL/pgSQL function inline_code_block line 9 at CALL
    47 LOCATION:  exec_stmt_raise, pl_exec.c:3827
    48   ?column?  |       error       | id1 |  id2   
    49 ------------+-------------------+-----+--------
    50  validation | face has no rings |  49 | [NULL]
    51 (1 row)
    52 
    53 
    54 }}}
    55 
    56 
    57 Here I run single thread and I have never got it to fail.
    58 OK test : db_topo_bug_4684_test_ok.sql
    59 
    60 Test with job_type 2 with many parallel , should return something like this
    61 
    62 {{{
    63 time psql t1 -f db_topo_bug_4684_test_ok.sql 2>&1|tee db_topo_bug_4684_test_ok.log
    64 
    65 }}}
    66 In this I run 4 threads in parallel (With parallel I have tests showing that it run more than 10 times faster, than using a single thread)
    67 I have got it to fail on mac a (with 2 dual core cpu) and Dell server (with 16 dual core cpu).
    68 It may fail after 1 or after or 20 loops and it to be seems totally random where in the map the error happens
    69 I have seen max 3 topo errors and they can occur in in cells not spatially not connected.
    70 
    71 FAILING test : db_topo_bug_4684_test_fail.sql
    72 
    73 
    74 {{{
    75 time psql t1 -f db_topo_bug_4684_test_fail.sql 2>&1|tee db_topo_bug_4684_test_fail.log
    76 
    77 PL/pgSQL function inline_code_block line 9 at CALL
    78 LOCATION:  exec_stmt_raise, pl_exec.c:3827
    79   ?column?  |       error       | id1 |  id2   
    80 ------------+-------------------+-----+--------
    81  validation | face has no rings |  49 | [NULL]
    82 (1 row)
    83 
    84 
    85 }}}
    86 
    87 
    88 Here I run single thread and I have never got it to fail.
    89 OK test : db_topo_bug_4684_test_ok.sql
    90 
    91 Test with job_type 2 with many parallel , should return something like this
    92 
    93 {{{
    94 time psql t1 -f db_topo_bug_4684_test_ok.sql 2>&1|tee db_topo_bug_4684_test_ok.log
    95 
    96 }}}
     3So the only problem we here are when multiple threads working with related spatial areas, which are expected.