Skip to content
This repository was archived by the owner on May 16, 2020. It is now read-only.

data resource free fixes#72

Merged
c-bik merged 0 commit intomasterfrom
free_data_fixes
Jun 19, 2019
Merged

data resource free fixes#72
c-bik merged 0 commit intomasterfrom
free_data_fixes

Conversation

@c-bik
Copy link
Member

@c-bik c-bik commented Jun 19, 2019

based on #71 investigations

@c-bik c-bik requested review from KarlKeiser, acautin and shamis June 19, 2019 10:47
@c-bik c-bik self-assigned this Jun 19, 2019
Copy link
Contributor

@acautin acautin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Memory usage reduced by 90% on compared to master on my test.

@c-bik c-bik merged this pull request into master Jun 19, 2019
@c-bik c-bik deleted the free_data_fixes branch June 19, 2019 12:01
c-bik pushed a commit that referenced this pull request Jul 4, 2019
* cosmetic
* ref stmt res cur is dataptr_res managed
* added resf cursor tests
cosmetics changes in test
test config cleanup

* Added missing internal call to dpi to release variables. (#68)

* Added missing internal call to dpi to release variables.
* exception on var release error
* removed redundant assignment

* get(dpi_node) returns a dead slave handling (#70)

* get(dpi_node) returns a dead slave handling
* added slave_call and updated rpc_call
* erlang:round/1 replaced with erlang:-module(dpi).

* data resource free fixes (#72)

* fixed merge errors

* unused macro

* restructured eunit compiling and running

* eunit cleanup fixes (#73)

* fix various bugs in eunit tests, remove iota and replace it with lists:seq
* cleanup, remove some debugging prints
* formatting

* eunit slave fix
better test title

* Karl eunit cleanup 1 (#77)

* improve exception handing in dpiCall's underlying functions to properly return exceptions
* fix a function that was not in dpiCall, fix ordr of freeing some var/datas
* formatting
* remove a debug line and some unneeded, commented functions

* Remove c tests (#78)

* remove old and unneeded c test files and their mention in the windwos makefile
* formatting
* remove test files from Linux makefile

* Simplified makefile using wildcard to get the sources automatically and removed unused library. (#80)

* Debug logging granularity (#62)

* Windows tested -- WIP
* Logging macro/levels
* ORANIF_DEBUG for erlang part

* nix compile optimizations (#79)

* nix compile warning resolved
* cosmetics
* more cosmetics
* more warning fixes and makefile clenaup

* eunit cleanup (#86)

* improve exception handing in dpiCall's underlying functions to properly return exceptions
* fix a function that was not in dpiCall, fix ordr of freeing some var/datas
* formatting
* remove a debug line and some unneeded, commented functions
* rename all test cases to reflect the functions that are being tested
* remove an issue where some data/var releases are in the rong order
* restructure drop_nonexistent_table testcase to omit context_getError
* split a testcase for dpiData tests into data_setTimestamp_test, data_setIntervalYM_test and data_setIntervalDS_test
* remove dpi:context_getError API
* remove two 'select from dual' statement executions that are not necessary anymore

* change test case names to be more compact

* change test case names to be more compact

* make contextGetClientVersion_test more lenient to support diferent client/server versions

* make contextGetClientVersion_test more lenient to support diferent client/server versions

* split connGetServerVersion_test off from contextGetClientVersion_test

* split connGetServerVersion_test off from contextGetClientVersion_test

* apply fixes from travis integration branch

* apply fixes from travis integration branch

* move some internal functions to their designated place

* move some internal functions to their designated place

* remove iozip function and inline its one call

* remove iozip function and inline its one call

* add boilerplate for no_input API testcases, implement contextCreate_test and contextCreate_NegativeMajType

* add boilerplate for no_input API testcases, implement contextCreate_test and contextCreate_NegativeMajType

* make contextCreate_NegativeMajType error matching more strict, add contextCreate_NegativeMinType and contextCreate_NegativeNonsenseMaj

* make contextCreate_NegativeMajType error matching more strict, add contextCreate_NegativeMinType and contextCreate_NegativeNonsenseMaj

* add tests contextDestroy_test, contextDestroy_NegativeContextType, contextDestroy_NegativeContextState, contextGetClientVersion_test, contextGetClientVersion_NegativeContextType and contextGetClientVersion_NegativeContextState

* add tests contextDestroy_test, contextDestroy_NegativeContextType, contextDestroy_NegativeContextState, contextGetClientVersion_test, contextGetClientVersion_NegativeContextType and contextGetClientVersion_NegativeContextState

* add boilerplate for tests that take only a context but not a connection, add API tests for connCreate and negative tests for  all its parameters as well as failing DPI function call

* add boilerplate for tests that take only a context but not a connection, add API tests for connCreate and negative tests for  all its parameters as well as failing DPI function call

* add boilerplate for API tests with both context and conn, WIP connPrepareStmt_test

* add boilerplate for API tests with both context and conn, WIP connPrepareStmt_test

* add tests for connPrepareStmt

* add tests for connPrepareStmt

* add tests for connNewVar

* add tests for connNewVar

* add asserations to some nice weather path API tests that otherwise had none

* add asserations to some nice weather path API tests that otherwise had none

* add tests for connCommit

* add tests for connCommit

* add tests for connRollback, connPing and connRelease

* add tests for connRollback, connPing and connRelease

* WIP

* WIP

* add testcases for connClose

* add testcases for connClose

* fix list handling for connclose

* fix list handling for connclose

* add tests for connGetServerVersion

* add tests for connGetServerVersion

* add tests for stmtExecute

* add tests for stmtExecute

* add tests for stmtFetch

* add tests for stmtFetch

* add tests for stmtGetQueryValue

* add tests for stmtGetQueryValue

* add tests for stmtGetQueryInfo

* add tests for stmtGetQueryInfo

* add tests for stmtGetNumQueryColumns

* add tests for stmtGetNumQueryColumns

* remove integration tests from oranif_eunit.erl

* remove integration tests from oranif_eunit.erl

* put integration tests in own file "integration_eunit.erl"

* put integration tests in own file "integration_eunit.erl"

* add tests for stmtBindValueByPos, add default excetion case for atom to dpi type conversion

* add tests for stmtBindValueByPos, add default excetion case for atom to dpi type conversion

* add tests for stmtBindValueByName

* add tests for stmtBindValueByName

* WIP

* WIP

* add tests for stmtBindByName

* add tests for stmtBindByName

* add tests for stmtRelease

* add tests for stmtRelease

* add tests for stmtDefine

* add tests for stmtDefine

* add tests for stmtDefineValue

* add tests for stmtDefineValue

* add tests for var_setFromBytes

* add tests for var_setFromBytes

* add tests for varRelease

* add tests for varRelease

* add tests for queryInfoGet

* add tests for queryInfoGet

* add tests for queryInfoDelete

* add tests for queryInfoDelete

* add tests for dataSetTimestamp

* add tests for dataSetTimestamp

* slight nomenclature fix with some test funtion

* slight nomenclature fix with some test funtion

* add tests for dataSetIntervalDS and DataSetIntervalYM

* add tests for dataSetIntervalDS and DataSetIntervalYM

* add tests for dataSetInt64

* add tests for dataSetInt64

* add dataSetInt64_viaPointer testcase, remove the capability to run data_setBytes via a pointer

* add tests for dataSetBytes, add explanation about lack of pointer version

* add tests for dataSetIsNull

* add tests for dataGet for getting null, int64, unit64, double, float and binary

* add tests for dataGet for getting timestamp, intervalDS and intervalYM

* implement dataSetStmt

* fix bugs in dataSetStmt, add tests for dataSetStmt

* add var_setFromStmt

* implement varSetFromStmt, add tests for varSetFromStmt

* add tests dataGet_testStmt

* add negative tests for dataGet

* add test case for dataGet where the stmt changes between calls

* add tests for dataGetInt64

* remove non-test files from merge diff
c-bik pushed a commit that referenced this pull request Jul 10, 2019
* re-work, clean WIP
currently segfault

* warnings

* Windows tested -- WIP

* Logging macro/levels

* ORANIF_DEBUG for erlang part

* fix tuples in dpi:dafe call, add error handling to call macro, create an own connection for the ping test

* change error message test to use invalid password instead of TNS to avoid timeout

* catch everything in execStmt macro

* change execStmt into a function

* separate stmt and conn tests into their own fixtures

* fixed merge errors

* unused macro

* restructured eunit compiling and running

* eunit cleanup fixes (#73)

* fix various bugs in eunit tests, remove iota and replace it with lists:seq
* cleanup, remove some debugging prints
* formatting

* eunit slave fix
better test title

* Karl eunit cleanup 1 (#77)

* improve exception handing in dpiCall's underlying functions to properly return exceptions
* fix a function that was not in dpiCall, fix ordr of freeing some var/datas
* formatting
* remove a debug line and some unneeded, commented functions

* eunit cleanup (#86)

* improve exception handing in dpiCall's underlying functions to properly return exceptions
* fix a function that was not in dpiCall, fix ordr of freeing some var/datas
* formatting
* remove a debug line and some unneeded, commented functions
* rename all test cases to reflect the functions that are being tested
* remove an issue where some data/var releases are in the rong order
* restructure drop_nonexistent_table testcase to omit context_getError
* split a testcase for dpiData tests into data_setTimestamp_test, data_setIntervalYM_test and data_setIntervalDS_test
* remove dpi:context_getError API
* remove two 'select from dual' statement executions that are not necessary anymore

* Karl eunit cleanup 2 (#87)

* cosmetic
* ref stmt res cur is dataptr_res managed
* added resf cursor tests
cosmetics changes in test
test config cleanup

* Added missing internal call to dpi to release variables. (#68)

* Added missing internal call to dpi to release variables.
* exception on var release error
* removed redundant assignment

* get(dpi_node) returns a dead slave handling (#70)

* get(dpi_node) returns a dead slave handling
* added slave_call and updated rpc_call
* erlang:round/1 replaced with erlang:-module(dpi).

* data resource free fixes (#72)

* fixed merge errors

* unused macro

* restructured eunit compiling and running

* eunit cleanup fixes (#73)

* fix various bugs in eunit tests, remove iota and replace it with lists:seq
* cleanup, remove some debugging prints
* formatting

* eunit slave fix
better test title

* Karl eunit cleanup 1 (#77)

* improve exception handing in dpiCall's underlying functions to properly return exceptions
* fix a function that was not in dpiCall, fix ordr of freeing some var/datas
* formatting
* remove a debug line and some unneeded, commented functions

* Remove c tests (#78)

* remove old and unneeded c test files and their mention in the windwos makefile
* formatting
* remove test files from Linux makefile

* Simplified makefile using wildcard to get the sources automatically and removed unused library. (#80)

* Debug logging granularity (#62)

* Windows tested -- WIP
* Logging macro/levels
* ORANIF_DEBUG for erlang part

* nix compile optimizations (#79)

* nix compile warning resolved
* cosmetics
* more cosmetics
* more warning fixes and makefile clenaup

* eunit cleanup (#86)

* improve exception handing in dpiCall's underlying functions to properly return exceptions
* fix a function that was not in dpiCall, fix ordr of freeing some var/datas
* formatting
* remove a debug line and some unneeded, commented functions
* rename all test cases to reflect the functions that are being tested
* remove an issue where some data/var releases are in the rong order
* restructure drop_nonexistent_table testcase to omit context_getError
* split a testcase for dpiData tests into data_setTimestamp_test, data_setIntervalYM_test and data_setIntervalDS_test
* remove dpi:context_getError API
* remove two 'select from dual' statement executions that are not necessary anymore

* change test case names to be more compact

* change test case names to be more compact

* make contextGetClientVersion_test more lenient to support diferent client/server versions

* make contextGetClientVersion_test more lenient to support diferent client/server versions

* split connGetServerVersion_test off from contextGetClientVersion_test

* split connGetServerVersion_test off from contextGetClientVersion_test

* apply fixes from travis integration branch

* apply fixes from travis integration branch

* move some internal functions to their designated place

* move some internal functions to their designated place

* remove iozip function and inline its one call

* remove iozip function and inline its one call

* add boilerplate for no_input API testcases, implement contextCreate_test and contextCreate_NegativeMajType

* add boilerplate for no_input API testcases, implement contextCreate_test and contextCreate_NegativeMajType

* make contextCreate_NegativeMajType error matching more strict, add contextCreate_NegativeMinType and contextCreate_NegativeNonsenseMaj

* make contextCreate_NegativeMajType error matching more strict, add contextCreate_NegativeMinType and contextCreate_NegativeNonsenseMaj

* add tests contextDestroy_test, contextDestroy_NegativeContextType, contextDestroy_NegativeContextState, contextGetClientVersion_test, contextGetClientVersion_NegativeContextType and contextGetClientVersion_NegativeContextState

* add tests contextDestroy_test, contextDestroy_NegativeContextType, contextDestroy_NegativeContextState, contextGetClientVersion_test, contextGetClientVersion_NegativeContextType and contextGetClientVersion_NegativeContextState

* add boilerplate for tests that take only a context but not a connection, add API tests for connCreate and negative tests for  all its parameters as well as failing DPI function call

* add boilerplate for tests that take only a context but not a connection, add API tests for connCreate and negative tests for  all its parameters as well as failing DPI function call

* add boilerplate for API tests with both context and conn, WIP connPrepareStmt_test

* add boilerplate for API tests with both context and conn, WIP connPrepareStmt_test

* add tests for connPrepareStmt

* add tests for connPrepareStmt

* add tests for connNewVar

* add tests for connNewVar

* add asserations to some nice weather path API tests that otherwise had none

* add asserations to some nice weather path API tests that otherwise had none

* add tests for connCommit

* add tests for connCommit

* add tests for connRollback, connPing and connRelease

* add tests for connRollback, connPing and connRelease

* WIP

* WIP

* add testcases for connClose

* add testcases for connClose

* fix list handling for connclose

* fix list handling for connclose

* add tests for connGetServerVersion

* add tests for connGetServerVersion

* add tests for stmtExecute

* add tests for stmtExecute

* add tests for stmtFetch

* add tests for stmtFetch

* add tests for stmtGetQueryValue

* add tests for stmtGetQueryValue

* add tests for stmtGetQueryInfo

* add tests for stmtGetQueryInfo

* add tests for stmtGetNumQueryColumns

* add tests for stmtGetNumQueryColumns

* remove integration tests from oranif_eunit.erl

* remove integration tests from oranif_eunit.erl

* put integration tests in own file "integration_eunit.erl"

* put integration tests in own file "integration_eunit.erl"

* add tests for stmtBindValueByPos, add default excetion case for atom to dpi type conversion

* add tests for stmtBindValueByPos, add default excetion case for atom to dpi type conversion

* add tests for stmtBindValueByName

* add tests for stmtBindValueByName

* WIP

* WIP

* add tests for stmtBindByName

* add tests for stmtBindByName

* add tests for stmtRelease

* add tests for stmtRelease

* add tests for stmtDefine

* add tests for stmtDefine

* add tests for stmtDefineValue

* add tests for stmtDefineValue

* add tests for var_setFromBytes

* add tests for var_setFromBytes

* add tests for varRelease

* add tests for varRelease

* add tests for queryInfoGet

* add tests for queryInfoGet

* add tests for queryInfoDelete

* add tests for queryInfoDelete

* add tests for dataSetTimestamp

* add tests for dataSetTimestamp

* slight nomenclature fix with some test funtion

* slight nomenclature fix with some test funtion

* add tests for dataSetIntervalDS and DataSetIntervalYM

* add tests for dataSetIntervalDS and DataSetIntervalYM

* add tests for dataSetInt64

* add tests for dataSetInt64

* add dataSetInt64_viaPointer testcase, remove the capability to run data_setBytes via a pointer

* add tests for dataSetBytes, add explanation about lack of pointer version

* add tests for dataSetIsNull

* add tests for dataGet for getting null, int64, unit64, double, float and binary

* add tests for dataGet for getting timestamp, intervalDS and intervalYM

* implement dataSetStmt

* fix bugs in dataSetStmt, add tests for dataSetStmt

* add var_setFromStmt

* implement varSetFromStmt, add tests for varSetFromStmt

* add tests dataGet_testStmt

* add negative tests for dataGet

* add test case for dataGet where the stmt changes between calls

* add tests for dataGetInt64

* remove non-test files from merge diff

* Karl eunit (#99)

* add tests for dataGetBytes
* fix a typo, add dataGetBytes test to the list of testcases
* add tests for dataRelease
* fix some tests that would fail for the wrong reason

* remove connRelease, stmtRelease, dataSetStmt and varSetFromStmt as well as any testcase that requires them

* add previsouyl uncommited file

* re-implement dataGet stmt tests using ref cursors

* reverted extra changes
to be done in respective branches

* reverted to old eunit tests

* test case reversation (for file name)

* test case module file renamed

* test case refurbished

* WIP

* code review 1st pass - WIP

* WIP redesigning API tests

* fix unsafe tests

* add and fix safe tests

* fiix a faulty testcase that could segfault, fix an issue where certain safe init functions didn't add the Node to their context maps

* refactor all test function names

* remove all manual 'ok' returns from all test funtions

* reformat some test cases, change contextGetClientVersionFail to fail in the correct place

* safe errors converted to thow for tests uniformity

* tr -> macro
other cosmetics

* fix indentation and line breaks to get all code in API tests below 82 characters per line

* use invalid resources and integers instead of foobar atoms in negative testcases, formatting

* bad int in hex
match to exact error message

* match error messages coming from NIF in test cases

* change syntax for empty binaries from <<"">> to <<>>

* indentation

* fix minor formatting issues

* minor cosmetics
c-bik added a commit that referenced this pull request Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants