Skip to content
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

CB-5369. Added API for transaction log for commits #3183

Merged
merged 27 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
02baaf3
CB-5369. Added API for transaction log for commits
DenisSinelnikov Jan 9, 2025
d352e50
Merge branch 'devel' into CB-5369-transaction-log-for-commits
DenisSinelnikov Jan 9, 2025
8d47710
CB-5369. Refactor after review
DenisSinelnikov Jan 9, 2025
1f04b43
Merge remote-tracking branch 'origin/CB-5369-transaction-log-for-comm…
DenisSinelnikov Jan 9, 2025
89e0ff4
CB-5369 add transaction logs table
devnaumov Jan 9, 2025
d0c621b
Merge branches 'CB-5369-transaction-log-for-commits' and 'CB-5369-tra…
devnaumov Jan 9, 2025
854f830
CB-5369. Added id for data
DenisSinelnikov Jan 10, 2025
0848dbf
Merge remote-tracking branch 'origin/CB-5369-transaction-log-for-comm…
DenisSinelnikov Jan 10, 2025
5f44a3b
CB-5369 fix typo
devnaumov Jan 10, 2025
b9fd5fb
CB-5369. Added event for get count
DenisSinelnikov Jan 10, 2025
a171da8
Merge remote-tracking branch 'origin/CB-5369-transaction-log-for-comm…
DenisSinelnikov Jan 10, 2025
024c671
CB-5369. Refactor event
DenisSinelnikov Jan 12, 2025
6659111
CB-5369. Refactor event
DenisSinelnikov Jan 12, 2025
bc54897
CB-5369. Refactor after review
DenisSinelnikov Jan 12, 2025
5622605
CB-5369. Refactor after review
DenisSinelnikov Jan 12, 2025
4e7b62f
CB-5369. Added connectionId to event
DenisSinelnikov Jan 12, 2025
3314f75
CB-5369 support count event
devnaumov Jan 12, 2025
c1f5834
CB-5369. Rename eventId
DenisSinelnikov Jan 13, 2025
96954ff
Merge remote-tracking branch 'origin/CB-5369-transaction-log-for-comm…
DenisSinelnikov Jan 13, 2025
0647177
CB-5369 adjust count styles
devnaumov Jan 13, 2025
6bea6b0
CB-5369 format time
devnaumov Jan 13, 2025
41c60fa
CB-5369 add missing deps
devnaumov Jan 13, 2025
abad3a0
CB-5369 remove extra important flags
devnaumov Jan 13, 2025
3c5332a
CB-5369 review fixes
devnaumov Jan 13, 2025
8f6e63e
CB-5369 remove extra import
devnaumov Jan 13, 2025
e0e5f82
Merge branch 'devel' into CB-5369-transaction-log-for-commits
dariamarutkina Jan 14, 2025
691ae67
Merge branch 'devel' into CB-5369-transaction-log-for-commits
dariamarutkina Jan 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CB-5369. Added connectionId to event
  • Loading branch information
DenisSinelnikov committed Jan 12, 2025
commit 4e7b62f25f46a89ea0cc51fe5e4441084b64f41b
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ type WSTransactionalCountEvent implements CBServerEvent {
topicId: CBEventTopic
contextId: String!
projectId: String!
connectionId: String!
transactionalCount: Int!
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
import org.jkiss.dbeaver.model.exec.trace.DBCTrace;
import org.jkiss.dbeaver.model.messages.ModelMessages;
import org.jkiss.dbeaver.model.meta.Property;
import io.cloudbeaver.model.WebTransactionLogInfo;

Check warning on line 36 in server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLContextInfo.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 Wrong lexicographical order for 'io.cloudbeaver.model.WebTransactionLogInfo' import. Should be before 'org.jkiss.dbeaver.model.meta.Property'. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLContextInfo.java:36:1: warning: Wrong lexicographical order for 'io.cloudbeaver.model.WebTransactionLogInfo' import. Should be before 'org.jkiss.dbeaver.model.meta.Property'. (com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck)
import io.cloudbeaver.model.WebTransactionLogItemInfo;

Check warning on line 37 in server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLContextInfo.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 Wrong lexicographical order for 'io.cloudbeaver.model.WebTransactionLogItemInfo' import. Should be before 'org.jkiss.dbeaver.model.meta.Property'. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLContextInfo.java:37:1: warning: Wrong lexicographical order for 'io.cloudbeaver.model.WebTransactionLogItemInfo' import. Should be before 'org.jkiss.dbeaver.model.meta.Property'. (com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck)
import org.jkiss.dbeaver.model.qm.QMTransactionState;
import org.jkiss.dbeaver.model.qm.QMUtils;
import org.jkiss.dbeaver.model.qm.meta.QMMConnectionInfo;
Expand Down Expand Up @@ -233,7 +233,7 @@

}

public WebTransactionLogInfo getTransactionLogInfo() {

Check warning on line 236 in server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLContextInfo.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 Missing a Javadoc comment. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLContextInfo.java:236:5: warning: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck)
DBCExecutionContext context = processor.getExecutionContext();
return getTransactionLogInfo(context);
}
Expand All @@ -249,7 +249,7 @@
QMMTransactionSavepointInfo sp = txnInfo.getCurrentSavepoint();
QMMStatementExecuteInfo execInfo = sp.getLastExecute();
for (QMMStatementExecuteInfo exec = execInfo; exec != null && exec.getSavepoint() == sp; exec = exec.getPrevious()) {
if (exec.getUpdateRowCount() > 0 ) {

Check warning on line 252 in server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLContextInfo.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 ')' is preceded with whitespace. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLContextInfo.java:252:54: warning: ')' is preceded with whitespace. (com.puppycrawl.tools.checkstyle.checks.whitespace.ParenPadCheck)
DBCExecutionPurpose purpose = exec.getStatement().getPurpose();
if (!exec.hasError() && purpose != DBCExecutionPurpose.META && purpose != DBCExecutionPurpose.UTIL) {
updateCount++;
Expand Down Expand Up @@ -297,7 +297,7 @@
}


public WebAsyncTaskInfo commitTransaction() {

Check warning on line 300 in server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLContextInfo.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 Missing a Javadoc comment. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLContextInfo.java:300:5: warning: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck)
DBCExecutionContext context = processor.getExecutionContext();
DBCTransactionManager txnManager = DBUtils.getTransactionManager(context);
WebAsyncTaskProcessor<String> runnable = new WebAsyncTaskProcessor<>() {
Expand Down Expand Up @@ -325,6 +325,7 @@
processor.getWebSession().getUserId(),
getProjectId(),
getId(),
getConnectionId(),
0
)
);
Expand Down Expand Up @@ -362,6 +363,7 @@
processor.getWebSession().getUserId(),
getProjectId(),
getId(),
getConnectionId(),
0
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@
long totalUpdateCount = 0;

WebSQLExecuteInfo result = new WebSQLExecuteInfo();
List<WebSQLQueryResults> queryResults = new ArrayList<>();

Check warning on line 363 in server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 Distance between variable 'queryResults' declaration and its first usage is 9, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value). Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java:363:9: warning: Distance between variable 'queryResults' declaration and its first usage is 9, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value). (com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck)
boolean isAutoCommitEnabled = true;

for (var rowIdentifier : rowIdentifierList) {
Expand Down Expand Up @@ -456,6 +456,7 @@
contextInfo.getWebSession().getUserId(),
contextInfo.getProjectId(),
contextInfo.getId(),
contextInfo.getConnectionId(),
count
)
);
Expand Down
Loading