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

sstableloader returns exit code 0 even if writes failed #37

Open
tgrabiec opened this issue Jun 23, 2017 · 2 comments
Open

sstableloader returns exit code 0 even if writes failed #37

tgrabiec opened this issue Jun 23, 2017 · 2 comments
Labels
bug Something isn't working right

Comments

@tgrabiec
Copy link
Contributor

tgrabiec commented Jun 23, 2017

It prints errors on stderr, but still will returns a success. May be a problem when this is run through some automation.

Relevant code in BulkLoader.java:

                semaphore.acquire();
                try {
                    ResultSetFuture future = session.executeAsync(s);
                    Futures.addCallback(future, new FutureCallback<ResultSet>() {
                        @Override
                        public void onSuccess(ResultSet result) {
                            semaphore.release();
                        }

                        @Override
                        public void onFailure(Throwable t) {
                            semaphore.release();
                            System.err.println(t);
                        }
                    }, MoreExecutors.directExecutor());
                } finally {
                }
@nyh
Copy link
Contributor

nyh commented Mar 9, 2021

@Orenef11 reported the same bug while writing a test for #220 and #230. Although syntax errors are reported during the sstableloader run (because of a bug that caused invalid CQL to be generated), at the end of the run sstableloader seemingly reports success, shows a count of partitions supposedly loaded, and returns exit code 0 - while it actually didn't manage to write anything.

@Orenef11
Copy link

Orenef11 commented Mar 9, 2021

The Scylla version is 2021-02-15T01:57:05Z (4.5)
The example of output returned from the command (the result code is 0) are :

com.datastax.driver.core.exceptions.SyntaxError: line 1:49  : missing elements...

com.datastax.driver.core.exceptions.SyntaxError: line 1:49  : missing elements...

com.datastax.driver.core.exceptions.SyntaxError: line 1:49  : missing elements...

...
...
...

com.datastax.driver.core.exceptions.SyntaxError: line 1:49  : missing elements...

com.datastax.driver.core.exceptions.SyntaxError: line 1:49  : missing elements...

com.datastax.driver.core.exceptions.SyntaxError: line 1:49  : missing elements...

com.datastax.driver.core.exceptions.SyntaxError: line 1:49  : missing elements...

100% done.        0 statements sent (in        0 batches,        0 failed).
    2000 statements generated.
    4000 cql rows processed in     2000 partitions.
       0 cql rows and        0 partitions deleted.
       0 local and        0 remote counter shards where skipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right
Projects
None yet
Development

No branches or pull requests

3 participants