- 11 11月, 2017 1 次提交
-
-
由 Jimmy Yih 提交于
cdbappendonlystorage_test.c: Test that calling appendonly_redo with XLOG_APPENDONLY_INSERT or XLOG_APPENDONLY_TRUNCATE will call ao_insert_replay or ao_truncate_replay respectively. xlog_mm_test.c: Test that an MMXLOG_REMOVE_FILE AO transaction log record will call XLogAODropSegmentFile. cdbmirroredappendonly_test.c: Test that ao_insert_replay or ao_truncate_replay will call XLogAOSegmentFile when we cannot find the AO segment file. xlogutils_test.c: Test that the invalid_page_tab hash table is properly used when invalid AO segment files are encountered. These four pieces combined will test the case when AO XLOG records are replayed but the corresponding segment files are missing from filesystem. The replay is entered into the invalid_page_tab hash table until a corresponding MMXLOG_REMOVE_FILE XLOG record type comes along to remove the entry. Currently these unit tests are under --enable-segwalrep configure flag in the Makefile but can be moved to the actual TARGET if non-segwalrep tests are added and need to be tested. Reference: https://github.com/greenplum-db/gpdb/commit/b659d0479fa57c383e7dbe15043cd2ca9d46f77f
-
- 25 8月, 2017 1 次提交
-
-
由 Heikki Linnakangas 提交于
ereport() has one subtle but important difference to elog: it doesn't evaluate its arguments, if the log level says that the message doesn't need to be printed. This makes a small but measurable difference in performance, if the arguments contain more complicated expressions, like function calls. While performance testing a workload with very short queries, I saw some CPU time being used in DtxContextToString. Those calls were coming from the arguments to elog() statements, and the result was always thrown away, because the log level was not high enough to actually log anything. Turn those elog()s into ereport()s, for speed. The problematic case here was a few elogs containing DtxContextToString calls, in hot codepaths, but I changed a few surrounding ones too, for consistency. Simplify the mock test, to not bother mocking elog(), while we're at it. The real elog/ereport work just fine in the mock environment.
-
- 19 8月, 2017 1 次提交
-
-
由 Xin Zhang 提交于
We also refactor the code out of `CreateCheckPoint()` and make it into its own function `GetXLogCleanUpTo()`. Unit test added to verify the new logic works for both master and segments. This is hidden under #ifdef USE_SEGWALREP. Signed-off-by: NAsim R P <apraveen@pivotal.io>
-
- 04 8月, 2017 1 次提交
-
-
由 Xin Zhang 提交于
Originally, we didn't verify the correct error level in our helper method.
-
- 02 6月, 2017 1 次提交
-
-
由 Xin Zhang 提交于
Originally, the reader kept copies of subtransaction information in two places. First, it copied SharedLocalSnapshotSlot to share between writer and reader. Second, reader kept another copy in subxbuf for better performance. Due to lazy xid, subtransaction information can change in the writer asynchronously with respect to the reader. This caused reader's subtransaction information out of date. This fix removes those copies of subtransaction information in the reader and adds a reference to the writer's PGPROC to SharedLocalSnapshotSlot. Reader should refer to subtransaction information through writer's PGPROC and pg_subtrans. Also added is a lwlock per shared snapshot slot. The lock protects shared snapshot information between a writer and readers belonging to the same session. Fixes github issues #2269 and #2284. Signed-off-by: NAsim R P <apraveen@pivotal.io>
-
- 09 12月, 2015 5 次提交
-
-
由 Heikki Linnakangas 提交于
Instead of creating a mock version of every backend object file, only create mock files as needed by individual tests. Speeds up the build, and is nicer anyway.
-
由 Heikki Linnakangas 提交于
This inverts the logic of the <testname>_REAL_OBJS mechanism. We now link with the real version of each object file, *except* those listed in <testname>_MOCK_OBJS variable.
-
由 Heikki Linnakangas 提交于
Some tests were already doing this, but it seems nicer to default to using the real memory manager for all tests. An individual test can still opt-out by listing the relevant files in <testname>_MOCK_OBJS. Some tests had had to jump through hoops to mock the memory manager, which is no longer necessary.
-
由 Heikki Linnakangas 提交于
There are a bunch of backend files that are never mocked, but always linked into test program as is. List those in Makefile.mock, so that every Makefile doesn't need to list them. Makes the makefiles simpler, and you need less boilerplate code when adding a new test program. Not all of these backend files were listed in the _REAL_OBJS variable of every test, but in those tests that they were not, they were also not used, so it doesn't matter if we use the real or mock version.
-
由 Heikki Linnakangas 提交于
This way we don't need to link the whole backend into client mock programs. We've gotten away with it so far, but it would cause clashes if one of the client programs contained a function or global variable with same name as in the backend. And of course it's completely unnecessary anyway.
-
- 16 11月, 2015 1 次提交
-
-
由 Heikki Linnakangas 提交于
This makes merging and diffing with upstream easier. There were so many GPDB-added GUCs in guc.c that "git merge" didn't handle it very well, and you easily got merge conflicts that were error-prone to fix manually. I kept a few GUCs in guc.c that are not present in REL8_2_0, because they were backported from later PostgreSQL versions, rather than being completely GPDB-specific. Clean up the diff between guc.c and upstream, by removing unnecessary includes, reordering a few GUCs to match upstream better, and similar cosmetic changes. I had to move MAX_KILOBYTES from guc.c to guc_tables.h, because guc_gp.c needs it too. I also had to export assign_msglvl() function from guc.c, so that it can be called from other assign_* functions from guc_gp.c. And I had to add the code to process the ConfigureNames*_gp arrays in addition to the upstream ones. These things increase the diff against upstream, but not by too much, IMHO. I also copy-pasted constants like MS_PER_S and KB_PER_MB, which seems safe as those are natural constants, and should never change.
-
- 07 11月, 2015 1 次提交
-
-
由 Heikki Linnakangas 提交于
Now that we no longer forcibly compile strlcpy.c, and only compile and link it into strlcpy.o into libpgport when needed, this is no longer needed. Furthermore, it caused the linking to fail on platforms that don't need strlcpy.o, like OS X.
-
- 28 10月, 2015 1 次提交
-
-