-
Notifications
You must be signed in to change notification settings - Fork 213
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
[Exasol] Maximum sqitch scripts reached #521
Comments
No limit on the number of scripts, but there may be a limit on the number of tags. Can you post your (appropriately obfuscated) plan file, please? |
we don't use tags at all. In addition, we generate the plan based on the numbers because we run the plan separately for each feature branch in the repo. In my opinion, this should have no effect on the squitch behavior.
|
Oh, I somehow spaced on the fact that it's Exasol. I just had a look at the code, and it does indeed limit a search to 250 changes here: sqitch/lib/App/Sqitch/Engine/exasol.pm Lines 294 to 309 in f5129f2
Looks like it was copied from the Oracle engine; @jwarlander do you see any reason why it should be limited thus? Try commenting out that subroutine (or just prepend an underscore to it) and see if that fixes the problem. That would let the default SQL implementation run, instead, which looks like this: sqitch/lib/App/Sqitch/Role/DBIEngine.pm Lines 408 to 416 in f5129f2
|
Actually, while that might do the trick, it looks like it could be an issue with the current implementation after all. I think this should fix it: --- a/lib/App/Sqitch/Engine/exasol.pm
+++ b/lib/App/Sqitch/Engine/exasol.pm
@@ -299,7 +299,8 @@ sub are_deployed_changes {
push @qs => 'change_id IN (' . join(', ' => ('?') x 250) . ')';
$i -= 250;
}
- push @qs => 'change_id IN (' . join(', ' => ('?') x @_) . ')';
+ push @qs => 'change_id IN (' . join(', ' => ('?') x $i) . ')'
+ if $i > 0;
my $expr = join ' OR ', @qs;
@{ $self->dbh->selectcol_arrayref(
"SELECT change_id FROM changes WHERE $expr", Would you give that a try and let me know? |
Thanks. That worked! |
I don't think the actual limit for query size / length of the IN list is anywhere near.. well.. 250 :P So I don't see any good reason to limit it like this, for Exasol at least. Though I haven't tried with a prepared statement, so I can't say if that needs to be taken into consideration as well. |
Then I guess the original Oracle implementation would also fail with > 250 changes, as it still uses sqitch/lib/App/Sqitch/Engine/oracle.pm Lines 427 to 432 in f5129f2
|
Yeah, I also patched the Oracle engine in #525. If you could try commenting out |
@jwarlander it also works if you comment out that part of the code. |
Let the default implementation handle it, since from feedback on issue #521, it seems that the partitioning of the IN clause is not required on Exasol.
Let the default implementation handle it, since from feedback on issue #521, it seems that the partitioning of the IN clause is not required on Exasol.
Hi,
I use sqitch for exasol in a docker environment.
Everything worked fine until I exceeded the 251 sqitch script count.
As soon as I had > 251 scripts, the following error message appeared:
Is there a limit on the number of scripts that can be used?
The error also only occurs when sqitch restarts from change 1. If less than 251 scripts are added at once, no error occurs.
The text was updated successfully, but these errors were encountered: