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

schema export via reactive driver #112

Closed
wants to merge 1 commit into from
Closed

Conversation

gavinking
Copy link
Member

This patch depends on a proposed change to Hibernate core. Please do not merge.

For #104

@gavinking gavinking linked an issue May 13, 2020 that may be closed by this pull request
@DavideD DavideD added the waiting We are waiting for another PR or issue to be solved before merging this one label May 14, 2020
@Override
public void accept(String command) {
try {
connection.preparedQuery(command).toCompletableFuture().join();
Copy link
Member Author

Choose a reason for hiding this comment

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

@vietj @FroMage @Sanne @DavideD WDYT of this?

I want to run Schema Export against the Vert.x driver, but I don't need it to actually be reactive. Also, I don't want to rewrite all of Hibernate's schema export stuff to use CompletionStage or whatever.

This seems to work fine, except with the @RunWith(VertxUnitRunner.class) where sometimes I get a harmless stacktrace from Vert.x at the end of my test.

Is this for some reason a terrible thing to be doing? Is there some other way we should be doing it?

Copy link
Contributor

Choose a reason for hiding this comment

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

@gavinking What's the stack trace complaining about? Is it the Vertx blocked thread checker? If that's the case, I think we can safely ignore that because we are intending to be blocking here. To silence the blocked thread checker, we could use our own Vertx instance where we can set the blocked thread checker interval to a really high value like so:

    VertxOptions vertxOptions = new VertxOptions();
    vertxOptions.setBlockedThreadCheckInterval(600);
    vertxOptions.setBlockedThreadCheckIntervalUnit(TimeUnit.MINUTES);
    Vertx vertx = Vertx.vertx(vertxOptions);

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah it looks to me like Vert.x shuts down the thread because it thinks it's misbehaving.

Let's try your suggestion. Thanks.

Copy link
Member Author

Choose a reason for hiding this comment

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

@aguibert so I looked for a place to set this up in VertxUnitRunner and didn't find anything obvious. @vietj any suggestion?

@gavinking
Copy link
Member Author

@aguibert I think you were searching for this work.

Note that you might be better off with this branch, since it fixes some bugs exposed by this PR.

@aguibert
Copy link
Contributor

@gavinking thanks for the pointer. I see that branch requires a snapshot of hibernate core. Should I be building a certain branch from core? Or better yet, is the required snapshot hosted on bintray or similar?

@Sanne
Copy link
Member

Sanne commented May 15, 2020

@gavinking thanks for the pointer. I see that branch requires a snapshot of hibernate core. Should I be building a certain branch from core? Or better yet, is the required snapshot hosted on bintray or similar?

sorry, we no longer deploy nightly snapshots.

Project:

To deploy a snapshot to maven local:

./gradlew publishToMavenLocal

@gavinking
Copy link
Member Author

I see that branch requires a snapshot of hibernate core. Should I be building a certain branch from core?

master

@gavinking
Copy link
Member Author

To deploy a snapshot to maven local:

./gradlew publishToMavenLocal

That's actually super-slow. I prefer:

./gradlew hibernate-core:publishToMavenLocal

(Though you probably also need hibernate-testing.)

@Sanne
Copy link
Member

Sanne commented May 15, 2020 via email

@gavinking
Copy link
Member Author

Now part of #118.

@gavinking gavinking closed this May 16, 2020
@gavinking gavinking deleted the ddl branch June 15, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting We are waiting for another PR or issue to be solved before merging this one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

schema export via Vert.x driver instead of JDBC
4 participants