1. 01 4月, 2017 6 次提交
    • A
      Fully enable lazy XID allocation in GPDB. · 0932453d
      Ashwin Agrawal 提交于
      As part of 8.3 merge, upstream commit 295e6398
      "Implement lazy XID allocation" was merged. But transactionIds were still
      allocated in StartTransaction as code changes required to make it work for GPDB
      with distrbuted transaction was pending, thereby feature remained as
      disabled. Some progress was made by commit
      a54d84a3 "Avoid assigning an XID to
      DTX_CONTEXT_QE_AUTO_COMMIT_IMPLICIT queries." Now this commit addresses the
      pending work needed for handling deferred xid allocation correctly with
      distributed transactions and fully enables the feature.
      
      Important highlights of changes:
      
      1] Modify xlog write and xlog replay record for DISTRIBUTED_COMMIT. Even if
      transacion is read-only for master and no xid is allocated to it, it can still
      be distributed transaction and hence needs to persist itself in such a case. So,
      write xlog record even if no local xid is assigned but transaction is
      prepared. Similarly during xlog replay of the XLOG_XACT_DISTRIBUTED_COMMIT type,
      perform distributed commit recovery ignoring local commit. Which also means for
      this case don't commit to distrbuted log, as its only used to perform reverse
      map of localxid to distributed xid.
      
      2] Remove localXID from gxact, as its no more needed to be maintained and used.
      
      3] Refactor code for QE Reader StartTransaction. There used to be wait-loop with
      sleep checking to see if SharedLocalSnapshotSlot has distributed XID same as
      that of READER to assign reader some xid as that of writer, for SET type
      commands till READER actually performs GetSnapShotData(). Since now a) writer is
      not going to have valid xid till it performs some write, writers transactionId
      turns out InvalidTransaction always here and b) read operations like SET doesn't
      need xid, any more hence need for this wait is gone.
      
      4] Thow error if using distributed transaction without distributed xid. Earlier
      AssignTransactionId() was called for this case in StartTransaction() but such
      scenario doesn't exist hence convert it to ERROR.
      
      5] QD earlier during snapshot creation in createDtxSnapshot() was able to assign
      localXid in inProgressEntryArray corresponding to distribXid, as localXid was
      known by that time. That's no more the case and localXid mostly will get
      assigned after snapshot is taken. Hence now even for QD similar to QE's snapshot
      creation time localXid is not populated but later found in
      DistributedSnapshotWithLocalMapping_CommittedTest(). There is chance to optimize
      and try to match earlier behavior somewhat by populating gxact in
      AssignTransactionId() once locakXid is known but currently seems not so much
      worth it as QE's anyways have to perform the lookups.
      0932453d
    • A
    • A
      bc967e0b
    • A
      Make storage test robust by checking if DB up. · 2cd7fd17
      Ashwin Agrawal 提交于
      2cd7fd17
    • A
      Optimize distributed xact commit check. · 692be1a1
      Ashwin Agrawal 提交于
      Leverage the fact that inProgressEntryArray is sorted based on distribXid while
      creating the snapshot in createDtxSnapshot. So, can break out fast in function
      DistributedSnapshotWithLocalMapping_CommittedTest().
      692be1a1
    • A
      Use ReadNewTransactionId() for xid_age(). · 8e115f54
      Ashwin Agrawal 提交于
      GetTopTransactionId() bumps the xid counter, doesn't seem required for this
      function. For GPDB this function may be called by QE READER, causing XID
      assignment in reader which is a voilation. Hence instead use
      ReadNewTransactionId() to just read current value instead of bumping the value.
      8e115f54
  2. 31 3月, 2017 17 次提交
  3. 30 3月, 2017 12 次提交
    • T
      Removes non-working @wip tests (#2105) · bbf6b1ae
      Todd Sedano 提交于
      bbf6b1ae
    • D
      Remove slow CTAS from gp_create_table to speed up test · ade37378
      Daniel Gustafsson 提交于
      The gp_create_table suite tests that the maximum number of columns
      can be specified as a distribution clause (well, it really tests
      that CREATE TABLE allows the maximum number of columns since that
      check applies first), and then tests to CTAS from the resulting
      table. There is no reason to believe that there is a difference
      between CTAS with 1600 columns and CTAS with fewer columns. Remove
      this case to speed up the test significantly and also adjust the
      DROP TABLE clauses to match reality.
      ade37378
    • D
      Ensure version output regardless of code tree · 0de5fc63
      Daniel Gustafsson 提交于
      Rather than relying on always having a full cloned repository when
      building, add fallbacks which work for trees with constrained (such
      as shallow-cloned trees), or no, history. When the tagged commit is
      reachable, use git describe, else rely on the version string in
      configure since that's required to always be there regardless of
      distribution mode. If we have git tree then include the HEAD sha1
      as well.
      
      While there, clean up versioning to more clearly separate us from
      upstream.
      0de5fc63
    • A
      Enable GPPC tests in ICW · 3ab8ef38
      Adam Lee 提交于
      Enable existing GPPC tests and move more from TINC to ICW to get higher
      coverage.
      
      For now we keep gppc_test, gppc_demo and tabfunc_gppc_demo test suites
      separate, may investigate more and merge them.
      Signed-off-by: NAdam Lee <ali@pivotal.io>
      Signed-off-by: NYuan Zhao <yuzhao@pivotal.io>
      3ab8ef38
    • M
      dd54e9c1
    • F
      Relocating memory usage dump from ExecutorEnd to MemoryAccounting_Reset() as... · b453d90d
      foyzur 提交于
      Relocating memory usage dump from ExecutorEnd to MemoryAccounting_Reset() as we no longer call ExecutorEnd upon abort. This ensures that we dump memory usage (if configured) once per command before resetting memory accounting. (#2113)
      
      b453d90d
    • J
      Remove bugbuster leftover schema_topology · 9c854010
      Jesse Zhang 提交于
      Not to be confused with a TINC test with the same name.
      This test was brought into the main suite in
      b82c1e60 as an effort to increase
      visibility into all the tests that we cared about. We never had the
      bandwidth to look at the intent of this test though.
      
      There are a plethora of problem of the bugbuster version of
      `schema_topology`:
      
      0. It has very unclear and mixed intent. For example, it depends on
      gphdfs (which nobody outside Pivotal can build) but it just tests that
      we are able to revoke privilege of that protocol.
      0. It creates and switches databases
      0. The vast number of cases in this test is duplicating coverage for
      tests elsewhere in `installcheck-good` and TINC.
      
      Burning this with fire.
      9c854010
    • O
      Bump Orca version to 2.14.0 · 153ab81c
      Omer Arap 提交于
      153ab81c
    • J
      Validate restoring a 4.3.x backup to a GPDB 5 database (#2074) · 12b0285c
      Jamie McAtamney 提交于
      This commit splits up the single backup.feature file (where each
      scenario both dumps and restores data) into two files, 
      dumps_only.feature which performs all necessary dumps and is 
      run against a 4.3 database and restores_only.feature which 
      performs the corresponding restores and is run against a 5 
      database. It also adds and/or modifies Behave steps to account
      for differences in functionality between 4.3 and 5. It uses the 
      installed GPDB python version when running behave tests. This is
      necessary when running different versions of Greenplum with the 
      same behave feature file.
      
      Authors: Karen Huddleston, Chris Hajas, Todd Sedano
      12b0285c
    • C
      gpdbrestore filtering should not filter out BEGIN..END blocks (#2097) · 04375b7f
      Chris Hajas 提交于
      gpdbrestore improperly filters out blocks that contain drop statements.
      BEGIN..END blocks from dumps should always be included in the restore.
      04375b7f
    • C
      docs: add a ref to Zettaset [#141726793] (#2119) · f6c1e8d3
      Chuck Litzell 提交于
      f6c1e8d3
    • C
      Remove gpsnap · 69474b5f
      Chumki Roy 提交于
      * Remove a previously deprecated utility
      * Remove mentions of gpsnap
      Signed-off-by: NMarbin Tan <mtan@pivotal.io>
      69474b5f
  4. 29 3月, 2017 3 次提交
  5. 28 3月, 2017 2 次提交
    • D
      Remove error table from external table dumping · 923109b0
      Daniel Gustafsson 提交于
      Error tables were removed in 5.0 but the syntax for creating them
      on external tables in pg_dump was left in. Remove the offending
      INTO <relname> syntax to ensure restoring works in 5.0+.
      
      Apply to pg_dump and cdb_dump_agent.
      923109b0
    • D
      Use faster PQExpBuffer operations where possible · e85f079f
      Daniel Gustafsson 提交于
      appendPQExpBuffer() is a variadic function which interprets the
      second parameter as a printf format string. Where we just append
      a static string, use appendPQExpBufferStr() instead which is much
      faster. Where a single char is added, use appendPQExpBufferChar().
      e85f079f