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

WT-13952 Move session_set_last_error out of session API and move last error from internal session to external session #11373

Conversation

DylanSHLiang
Copy link
Contributor

Modified session_set_last_error function to outside of session API and moved last error from internal session to external session when releasing the internal session.

LX6T and others added 29 commits December 23, 2024 04:36
Copy link

github-actions bot commented Jan 3, 2025

Thanks for creating a pull request! Please answer the questions below by editing this comment.

Type of change made in this PR

  • Functional change
  • Test-only change
  • Refactor-only change
  • Other non-functional change

What makes this change safe?

This change is low risk as the changes are refactoring the code and extending on existing code. The refactoring code does not change behaviour so it should not affect existing code, and the extension on existing code also does not change behaviour. Therefore, the python and unit tests should be enough to ensure correctness.

References:

Checklist before requesting a review

  • I have performed a self-review of my code.
  • I have made corresponding changes to the documentation, or no documentation change is needed.
  • I have tests that show my change is correct, or have described above why functional test changes are not required.

Copy link
Contributor

@jiechenbo jiechenbo left a comment

Choose a reason for hiding this comment

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

LGTM

@jiechenbo jiechenbo self-requested a review January 3, 2025 02:51
@jiechenbo
Copy link
Contributor

Actually I realised that the copying of errors from internal sessions to external sessions have not be done yet. Could you potentially be missing those changes?

@DylanSHLiang
Copy link
Contributor Author

Actually I realised that the copying of errors from internal sessions to external sessions have not be done yet. Could you potentially be missing those changes?

Fixed in this commit

Copy link
Contributor

@jiechenbo jiechenbo left a comment

Choose a reason for hiding this comment

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

Close to LGTM, i would also update the comment within __wti_schema_internal_session function, to mention that we do not clear the new flag because it follows from an external session.

src/schema/schema_util.c Outdated Show resolved Hide resolved
src/session/session_helper.c Outdated Show resolved Hide resolved
src/session/session_helper.c Outdated Show resolved Hide resolved
test/catch2/misc_tests/test_session_set_last_error.cpp Outdated Show resolved Hide resolved
src/session/session_helper.c Show resolved Hide resolved
Copy link
Contributor

@zunyiliu zunyiliu left a comment

Choose a reason for hiding this comment

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

LGTM, please fix the redundant code for F_SET as in my last comment.

src/session/session_api.c Outdated Show resolved Hide resolved
Copy link
Contributor

@jeremythorp jeremythorp left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@jiechenbo jiechenbo left a comment

Choose a reason for hiding this comment

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

LGTM!

@LX6T LX6T added this pull request to the merge queue Jan 7, 2025
Merged via the queue into develop with commit c3fbce2 Jan 7, 2025
10 checks passed
@LX6T LX6T deleted the wt-13952-move-last-error-from-internal-session-to-external-session branch January 7, 2025 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants