forked from microsoft/mssql-jdbc
-
Notifications
You must be signed in to change notification settings - Fork 0
Icr enable feature new poller #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rene-ye
wants to merge
93
commits into
ulvii:ICREnableFeature
Choose a base branch
from
rene-ye:ICREnableFeatureNewPoller
base: ICREnableFeature
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Icr enable feature new poller #20
rene-ye
wants to merge
93
commits into
ulvii:ICREnableFeature
from
rene-ye:ICREnableFeatureNewPoller
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix | Remove "country" from changelog
…oft#861) * Avoid string concatenation in `StringBuilder.append()` * Replace string concatenation w/ StringBuilder in loops
…' is assigned to itself (microsoft#858)
…tObject() (microsoft#830) * Add support for OffsetDateTime to be passed as 'type' in ResultSet.getObject() * Typo fix. * Added OffsetTime support. Allow retrieving OffsetTime out of DATETIMEOFFSET column. * Added assertions for more coverage.
…t#878) * ported tests from VSO and added tests to increase code coverage * moved resultset tests to resultset * removed unused import * added tests to increase code coverage * fixed issue with timezone * fixed issue with timezone * modified testWithThaiLocale to use current time * fixed issue with timezone * fixed issue with timezone * fixed issue with timezone * added SparseTest and BigIntegerTest and cleaned up with try-with-resources * review changes * review comments * more review updates * review updates * removed dummy file * review udpates * more cleanup * updated isSqlAzure * review updates * more review updates * fixed imports * updated failed error strings with more detail * added locale to time format * format date for comparision * 1 more timezone fix * cleanup leaded stream resources * manually merged with microsoft#903 changes for now * more cleanup on assertEqual checks * more cleanup on assertEqual checks * cosmetic changes from review * updated all assertEquals params to proper expected, actual order * fixed comments and leaked resultsets
… default time zone. (microsoft#831) * Added a test case: If an instance of java.time.OffsetDateTime which has a different time zone than the default time zone is passed to `PreparedStatement#setObject()`, the driver sends an incorrect value. * Use OffsetDateTime#toEpochSecond() instead of java.time.Timestamp#getTime(). `java.sql.Timestamp#getTime()` subsequently invokes `java.util.Date#normalize()` which takes the default TimeZone into account. * Applied the previous change to the code handling OFFSETTIME. * Removed an unused import.
Fix | Make SSL certificate validation respect wildcards (microsoft#836)
…types. (microsoft#912) Fix | Workaround Bulk Copy for batch insert operation against specific datatypes. (microsoft#912)
Synchronize branches dev <> master
* Replace timeout handling to use SharedTimer Replaces the timeout handling for basic and bulk TDS commands to use a new SharedTimer class. SharedTimer provides a static method for fetching an existing static object or creating one on demand. Usage is tracked through reference counting and callers are required to call removeRef() when they will no longer be using the SharedTimer. If the SharedTimer does not have any more references then its internal ScheduledThreadPoolExecutor will be shutdown. The SharedTimer is cached at the Connection level so that repeated invocations do not create new timers. Connections only create timers on first use so if no actions involve a timeout then no timer is fetched or created. If a Connection does create a timer then it will be released when the Connection closed. Properly written JDBC applications that always close their Connection objects when they are finished using them should not have any extra threads running after they are all closed. Applications that do not use query timeouts will not have any extra threads created as they are only done on demand. Applications that use timeouts and use a JDBC connection pool will have a single shared object across all JDBC connections as long as there are some open connections in the pool with timeouts enabled. Interrupt actions to handle a timeout are executed in their own thread. A handler thread is created when the timeout occurs with the thread name matching the connection id of the client connection that created the timeout. If the timeout is canceled prior to the interrupt action being executed, say because the command finished, then no handler thread is created. Note that the sharing of the timers happens across all Connections, not just Connections with the same JDBC URL and properties. * Normalize newlines in TimeoutTest * Move TimeoutTest to parent package so that it can access package private members * Centralize SharedTimer thread checks in TimeoutTest Centralize checks for SharedTimer thread state in TimeoutTest to happen before and after all test invocations in TimeoutTest via JUnit @before and @after annotations. Each test now requires that the SharedTimer thread not be running before the test starts and after the test completes. Also expands the thread name prefix in SharedTimer to package private so that TimeoutTest can reference it rather than having its own copy fo the string. * Centralize and reduce timeout value used in TimeoutTest Centralizes constant timeout value used in TimeoutTest and reduces it from ten seconds down to two seconds to speed up tests. * Centralize SQL for WAIT FOR DELAY in TimeoutTest Centralizes the SQL command for WAIT FOR DELAY in TimeoutTest and changes the format of the delay to use hour:minute:second for clarity. * Clean up TimeoutTest to use assertThrows(...) Changes test in TimeoutTest to use assertThrows(...) rather than manually checking for the thrown exception. Also cleans up and adds internal helpers for creating a connection and changes internal runQuery(...) to be void rather than returning a boolean. * Add additional SharedTimer tests Adds additional tests to verify creation and shutdown of SharedTimer core thread when user commands specify a query timeout. * Improve waiting for SharedTimer thread stoppage Change waiting for SharedTimer thread to stop to happen in a loop with periodic checks to see if the thread has stopped up to a max amount of waiting (10 seconds). * Remove System.err.println(...) in TdsTimeoutTask * Rename static SharedTimer singleton to instance * Replace SharedTimer ThreadFactory with inline lambda * Add comments for SharedTimer * Rename TdsTimeoutTask to TDSTimeoutTask
FIX | SonarQube changes (microsoft#930)
FIX | Fix issues identified by SonarQube (microsoft#929)
…REnableFeatureNewPoller # Conflicts: # src/main/java/com/microsoft/sqlserver/jdbc/IOBuffer.java # src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerDataSource.java # src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java # src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDriver.java # src/main/java/com/microsoft/sqlserver/jdbc/SQLServerResource.java Also moved some tests around. Timeout tests currently have issues.
…REnableFeatureNewPoller # Conflicts: # src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java
…rosoft#934) * Handle null values in TVP * More improvements
…REnableFeatureNewPoller # Conflicts: # src/main/java/com/microsoft/sqlserver/jdbc/IOBuffer.java
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.