osdldbt / dbt5 Goto Github PK
View Code? Open in Web Editor NEWDatabase Test 5: Fair Use TPC Benchmark(TM) E
License: Artistic License 2.0
Database Test 5: Fair Use TPC Benchmark(TM) E
License: Artistic License 2.0
At least as recent as the update for egen v1.14.0, generating flat files and loading produces the expected number of rows, so this suggests there something wrong with the custom code path in EGenLoader.
The pgsql-check-db script suggests only the growing tables (expect trade_request) have issues:
GROWING TABLES
==============
cash_transaction 79488000 ~ 15897761
holding 4406400 ~ 888468
holding_history 115776000 ~ 23156714
holding_summary 248900 ~ 49786
settlement 86400000 ~ 17280000
trade 8640000 ~ 17280000
trade_history 207360000 ~ 41472674
trade_request 0 = 0
I have a debian 12 with libpq-dev and the library installed.
I always get those build issues when I try to build tpc-e tools:
s/SecurityDetailDB.o transactions/TradeCleanupDB.o transactions/TradeLookupDB.o transactions/TradeOrderDB.o transactions/TradeResultDB.o transactions/TradeStatusDB.o transactions/TradeUpdat
eDB.o transactions/TxnBaseDB.o \
DateTime.o error.o Random.o Money.o EGenVersion.o locking.o threading.o condition.o \
interfaces/DMSUTtest.o interfaces/MEESUTtest.o TestTransactions/TestTxn.o interfaces/TxnHarnessSendToMarketTest.o \
../lib/libegen.a \
\
-o ../bin/TestTxn; \
cd ../prj; \
ls -l ../bin
total 7552
drwxr-xr-x 2 root root 4096 Feb 16 13:16 .
drwxr-xr-x 15 root root 4096 Feb 16 13:16 ..
-rw-r--r-- 1 root root 0 Feb 16 13:16 BrokerageHouseMain
-rw-r--r-- 1 root root 0 Feb 16 13:16 DriverMain
-rwxr-xr-x 1 root root 6645312 Feb 16 13:16 EGenLoader
-rwxr-xr-x 1 root root 749480 Feb 16 13:16 EGenValidate
-rw-r--r-- 1 root root 4095527 Feb 16 13:16 MarketExchangeMain
-rw-r--r-- 1 root root 0 Feb 16 13:16 TestTxn
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::CDBConnection(char const*, char const*, char const*)':
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:120: undefined reference to `PQconnectdb'
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::~CDBConnection()':
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:126: undefined reference to `PQfinish'
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::begin()':
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:132: undefined reference to `PQexec'
/usr/bin/ld: /root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:133: undefined reference to `PQclear'
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::connect()':
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:139: undefined reference to `PQconnectdb'
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::commit()':
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:145: undefined reference to `PQexec'
/usr/bin/ld: /root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:146: undefined reference to `PQclear'
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::escape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:152: undefined reference to `PQescapeLiteral'
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::disconnect()':
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:161: undefined reference to `PQfinish'
/usr/bin/ld: transactions/pgsql/DBConnection.o: in function `CDBConnection::exec(char const*, int, unsigned int const*, char const* const*, int const*, int const*, int)':
/root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:176: undefined reference to `PQexecParams'
/usr/bin/ld: /root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:178: undefined reference to `PQresultStatus'
/usr/bin/ld: /root/egen/prj/../src/transactions/pgsql/DBConnection.cpp:194: undefined reference to `PQresultErrorMessage'
In reference to the nested while loop in the main transaction loop
storedproc/pgsql/pgsql/trade_order.sql
The sub-transaction control should be added as the commit transaction are identified in the TPC-Ev1.14 Pseudo-code (Page 159 of 287).
Starting the sub-transaction would be after line 597
The preliminary conversion to a stored procedure would be implemented by adhering to convention and adding Frame 6's commit after the "WHERE CA_ID = acct_id;" on line 620.
There is no ROLLBACK call in neither the 3.3.8.2 Trade-Result Transaction Database Footprint nor the Trade-Result_Frame-6 Pseudo-code to implement.
Updating the CREATE FUNCTION with CREATE PROCEDURE on line 581
The parameter changes to handle the return values would be after line 622.
Modification to the C++ code to call the procedure would be on line 154 of dbt5/TradeResultDB.cpp
dbt5-build-egen tool is throwing error while building the egen. Followed instructions in https://github.com/osdldbt/dbt5/blob/main/doc/user-guide.rst to build the tool
dbt5-build-egen /tmp/egen
ERROR: missing 'series' file in '/usr/share/dbt5/patches', try "dbt5-build-egen --help" for more information.
tried another way but I see different error
dbt5-build-egen --build-only /tmp/egen
../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::SECURITY_ROW]': ../src/../inc/SecurityTable.h:143:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::SECURITY_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:58, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETradingFloor.h:50, from ../src/MEETradingFloor.cpp:42: ../src/../inc/TableRows.h:302:16: note: 'struct TPCE::SECURITY_ROW' declared here typedef struct SECURITY_ROW ^~~~~~~~~~~~ In file included from ../src/MEETickerTape.cpp:42: ../src/../inc/MEETickerTape.h: In constructor 'TPCE::CMEETickerTape::CMEETickerTape(TPCE::CMEESUTInterface*, TPCE::CMEEPriceBoard*, TPCE::CDateTime*, TPCE::CDateTime*, const TPCE::DataFileManager&)': ../src/../inc/MEETickerTape.h:81:25: warning: 'TPCE::CMEETickerTape::m_pCurrentTime' will be initialized after [-Wreorder] CDateTime* m_pCurrentTime; ^~~~~~~~~~~~~~ In file included from ../src/MEETickerTape.cpp:42: ../src/../inc/MEETickerTape.h:70:36: warning: 'const StatusTypeDataFile_t& TPCE::CMEETickerTape::m_StatusType' [-Wreorder] const StatusTypeDataFile_t& m_StatusType; ^~~~~~~~~~~~ ../src/MEETickerTape.cpp:84:1: warning: when initialized here [-Wreorder] CMEETickerTape::CMEETickerTape( CMEESUTInterface* pSUT, CMEEPriceBoard* pPriceBoard, CDateTime* pBaseTime, CDateTime* pCurrentTime, const DataFileManager &dfm ) ^~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:59, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETradingFloor.h:50, from ../src/MEETradingFloor.cpp:42: ../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::DAILY_MARKET_GEN_ROW]': ../src/../inc/DailyMarketTable.h:138:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::DAILY_MARKET_GEN_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_stdafx.h:71, from ../src/../inc/MEEPriceBoard.h:47, from ../src/../inc/MEETradingFloor.h:53, from ../src/MEETradingFloor.cpp:42: ../src/../inc/DailyMarketTable.h:67:20: note: 'struct TPCE::DAILY_MARKET_GEN_ROW' declared here typedef struct DAILY_MARKET_GEN_ROW ^~~~~~~~~~~~~~~~~~~~ In file included from ../src/MEETickerTape.cpp:42: ../src/../inc/MEETickerTape.h: In constructor 'TPCE::CMEETickerTape::CMEETickerTape(TPCE::CMEESUTInterface*, TPCE::CMEEPriceBoard*, TPCE::CDateTime*, TPCE::CDateTime*, TPCE::RNGSEED, const TPCE::DataFileManager&)': ../src/../inc/MEETickerTape.h:81:25: warning: 'TPCE::CMEETickerTape::m_pCurrentTime' will be initialized after [-Wreorder] CDateTime* m_pCurrentTime; ^~~~~~~~~~~~~~ In file included from ../src/MEETickerTape.cpp:42: ../src/../inc/MEETickerTape.h:70:36: warning: 'const StatusTypeDataFile_t& TPCE::CMEETickerTape::m_StatusType' [-Wreorder] const StatusTypeDataFile_t& m_StatusType; ^~~~~~~~~~~~ ../src/MEETickerTape.cpp:100:1: warning: when initialized here [-Wreorder] CMEETickerTape::CMEETickerTape( CMEESUTInterface* pSUT, CMEEPriceBoard* pPriceBoard, CDateTime* pBaseTime, CDateTime* pCurrentTime, RNGSEED RNGSeed, const DataFileManager &dfm ) ^~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:59, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETradingFloor.h:50, from ../src/MEETradingFloor.cpp:42: ../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::NEWS_ITEM_AND_XREF_ROW]': ../src/../inc/NewsItemAndXRefTable.h:122:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::NEWS_ITEM_AND_XREF_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_stdafx.h:76, from ../src/../inc/MEEPriceBoard.h:47, from ../src/../inc/MEETradingFloor.h:53, from ../src/MEETradingFloor.cpp:42: ../src/../inc/NewsItemAndXRefTable.h:57:20: note: 'struct TPCE::NEWS_ITEM_AND_XREF_ROW' declared here typedef struct NEWS_ITEM_AND_XREF_ROW ^~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:59, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETradingFloor.h:50, from ../src/MEETradingFloor.cpp:42: ../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::LAST_TRADE_ROW]': ../src/../inc/LastTradeTable.h:95:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::LAST_TRADE_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:58, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETradingFloor.h:50, from ../src/MEETradingFloor.cpp:42: ../src/../inc/TableRows.h:266:16: note: 'struct TPCE::LAST_TRADE_ROW' declared here typedef struct LAST_TRADE_ROW ^~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:59, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETickerTape.h:50, from ../src/MEETickerTape.cpp:42: ../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::COMPANY_ROW]': ../src/../inc/CompanyTable.h:126:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::COMPANY_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:58, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETickerTape.h:50, from ../src/MEETickerTape.cpp:42: ../src/../inc/TableRows.h:114:16: note: 'struct TPCE::COMPANY_ROW' declared here typedef struct COMPANY_ROW ^~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:59, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETickerTape.h:50, from ../src/MEETickerTape.cpp:42: ../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::FINANCIAL_GEN_ROW]': ../src/../inc/FinancialTable.h:196:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::FINANCIAL_GEN_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_stdafx.h:64, from ../src/../inc/MEEPriceBoard.h:47, from ../src/../inc/MEETickerTape.h:53, from ../src/MEETickerTape.cpp:42: ../src/../inc/FinancialTable.h:87:20: note: 'struct TPCE::FINANCIAL_GEN_ROW' declared here typedef struct FINANCIAL_GEN_ROW ^~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:59, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETickerTape.h:50, from ../src/MEETickerTape.cpp:42: ../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::SECURITY_ROW]': ../src/../inc/SecurityTable.h:143:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::SECURITY_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:58, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETickerTape.h:50, from ../src/MEETickerTape.cpp:42: ../src/../inc/TableRows.h:302:16: note: 'struct TPCE::SECURITY_ROW' declared here typedef struct SECURITY_ROW ^~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_common.h:59, from ../src/../inc/CustomerAccountsAndPermissionsTable.h:44, from ../src/../inc/TxnHarnessStructs.h:48, from ../src/../inc/MEETickerTape.h:50, from ../src/MEETickerTape.cpp:42: ../src/../inc/TableTemplate.h: In instantiation of 'void TPCE::TableTemplate<T>::ClearRecord() [with T = TPCE::DAILY_MARKET_GEN_ROW]': ../src/../inc/DailyMarketTable.h:138:25: required from here ../src/../inc/TableTemplate.h:144:32: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'struct TPCE::DAILY_MARKET_GEN_ROW' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess] void ClearRecord() { memset(&m_row, 0, sizeof(m_row)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/../inc/EGenTables_stdafx.h:71, from ../src/../inc/MEEPriceBoard.h:47, from ../src/../inc/MEETickerTape.h:53, from ../src/MEETickerTape.cpp:42: ../src/../inc/DailyMarketTable.h:67:20: note: 'struct TPCE::DAILY_MARKET_GEN_ROW' declared here typedef struct DAILY_MARKET_GEN_ROW
In reference to the nested if clause in the main transaction loop
storedproc/pgsql/pgsql/trade_order.sql
Note: Trade_Order.SQL, Frames 5 & 6 are not implemented for the rollback or commit transaction
The sub-transaction control should be added as the commit transaction are identified in the TPC-Ev1.14 Pseudo-code (Page 139 of 287).
Starting the sub-transaction would be after line 528
The preliminary conversion to a stored procedure would be implemented by adhering to convention and adding Frame 6 after the "RETURN trade_id;" on line 528.
There is an COMMIT call in the 3.3.7.2 Trade-Order Transaction Database Footprint and the Trade-Order_Frame-6 Pseudo-code to implement.
Updating the CREATE FUNCTION with CREATE PROCEDURE on line 528
The parameter changes to handle the return values would be after line 528 as the customer, customer's account, and the broker for the account would be referenced. (Page 122 of 287)
3.3.7 The Trade-Order Transaction
...
The Trade-Order Transaction is invoked by the EGenDriverCE. It consists of six Frames. The Transaction starts by using the account ID passed into the Transaction to obtain information on the customer, the customer's account, and the broker for the account.
...
Modification to the C++ code to call the procedure would be on line 170 of dbt5/TradeOrderDB.cpp
In reference to the nested while loop in the main transaction loop
In reference to the nested while loop in the main transaction loop
storedproc/pgsql/pgsql/trade_update.sql
The sub-transaction control should be added as the start transaction and the commit transaction are identified in the TPC-Ev1.14 Pseudo-code (Page 176 of 287).
Starting the sub-transaction would be on line 391
The preliminary conversion to a stored procedure would be implemented by adhering to convention and adding COMMIT after the "END LOOP;" on line 572.
There are no explicit ROLLBACK calls in either the 3.3.10.2 Trade-Update Transaction Database Footprint or the Trade-Update_Frame-3 Pseudo-code to implement.
Updating the CREATE FUNCTION with CREATE PROCEDURE on line 363
The parameter changes to handle the return values would be on line 521 and line 571.
Modification to the C++ code to call the procedure would be on line 249
storedproc/pgsql/pgsql/trade_order.sql
The sub-transaction control should be added as the commit transaction are identified in the TPC-Ev1.14 Pseudo-code (Page 190 of 287).
Starting the sub-transaction would be at line 51
The preliminary conversion to a stored procedure would be implemented by adhering to convention and modifying Frame 1 on line 51 as after line 345 there should be the COMMIT.
There is neither a ROLLBACK call in the 3.3.11.2 Data-Maintenance Transaction Database Footprint and the Data-Maintenance_Frame-1 Pseudo-code to implement.
Updating the CREATE FUNCTION with CREATE PROCEDURE on line 16
There would be no parameter changes to handle the return values at line 345.
Modification to the C++ code to call the procedure would be on line 34 of dbt5/DataMaintenanceDB.cpp
storedproc/pgsql/pgsql/trade_order.sql Frame 5 (MISSING)
Note: Trade_Order.SQL, Frames 5 & 6 are not implemented for the rollback or commit transaction
The sub-transaction control should be added as the rollback transaction and the commit transaction are identified in the TPC-Ev1.14 Pseudo-code (Page 137 of 287).
Starting the sub-transaction would be after line 528
The preliminary conversion to a stored procedure would be implemented by adhering to convention and adding Frame 5 after the "RETURN trade_id;" on line 528.
There is an ROLLBACK call in the 3.3.7.2 Trade-Order Transaction Database Footprint and the Trade-Order_Frame-5 Pseudo-code to implement.
Updating the CREATE FUNCTION with CREATE PROCEDURE on line 528
The parameter changes to handle the return values would be after line 528 as the customer, customer's account, and the broker for the account would be referenced. (Page 122 of 287)
3.3.7 The Trade-Order Transaction
...
The Trade-Order Transaction is invoked by the EGenDriverCE. It consists of six Frames. The Transaction starts by using the account ID passed into the Transaction to obtain information on the customer, the customer's account, and the broker for the account.
...
Modification to the C++ code to call the procedure would be on line 154 of dbt5/TradeOrderDB.cpp
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.