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

0.4.8 - Parallel queries may produce java.util.ConcurrentModificationException #265

Open
martinreilent opened this issue May 15, 2020 · 3 comments

Comments

@martinreilent
Copy link

Got this exception today after experimenting with 0.4.8.

Setup:
Spring boot fresh setup 2.2.7
Oracle db 12c

concurrentModification_stackTrace.txt

Tried to also reproduce with h2 in memory test data

@EntityScan("com.example.graghql.graphql_learning.models")
public class GraphqlLearningApplication {

    public static void main(String[] args) {
        SpringApplication.run(GraphqlLearningApplication.class, args);
    }

    @Bean
    CommandLineRunner asd (GraphQLExecutor executor) {
        return args -> {
            String query = "query { Authors(where: { books: {genre: {IN: %s}} }) { select { id name books { id title genre } } } }";
            ExecutorService executorService = Executors.newFixedThreadPool(10);

            for (Genre genre: Genre.values()) {
                executorService.submit(() ->  executor.execute(String.format(query, genre.toString()), Map.of()).getData());
            }
        };
    }

but couldnt get the same exact result. Instead got the
java.util.concurrent.CompletionException: java.lang.NullPointerException

parallel_execute_npe.txt

image

@hump
Copy link

hump commented Jun 30, 2020

we also got such errors with the actual version while use using a react backend...

@hump
Copy link

hump commented Jul 4, 2020

happens since 0.4.0

@hump
Copy link

hump commented Oct 15, 2020

any chance this could be fixed?
would a test case helpful to reproduce it?

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

No branches or pull requests

2 participants