Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
04e6364a
Commit
04e6364a
authored
7 years ago
by
Stephen R. van den Berg
Browse files
Options
Downloads
Patches
Plain Diff
pgsql: Support spurious syncs in a stashed queue.
parent
2a077f79
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/modules/Sql.pmod/pgsql.pike
+1
-1
1 addition, 1 deletion
lib/modules/Sql.pmod/pgsql.pike
lib/modules/Sql.pmod/pgsql_util.pmod
+6
-8
6 additions, 8 deletions
lib/modules/Sql.pmod/pgsql_util.pmod
with
7 additions
and
9 deletions
lib/modules/Sql.pmod/pgsql.pike
+
1
−
1
View file @
04e6364a
...
@@ -1327,7 +1327,7 @@ private int reconnect() {
...
@@ -1327,7 +1327,7 @@ private int reconnect() {
catch(c->close());
catch(c->close());
unnamedstatement = 0;
unnamedstatement = 0;
termlock = 0;
termlock = 0;
destruct(c);
catch(
destruct(c)
)
;
PD("Flushing old cache\n");
PD("Flushing old cache\n");
foreach(_prepareds;;mapping tp)
foreach(_prepareds;;mapping tp)
m_delete(tp,"preparedname");
m_delete(tp,"preparedname");
...
...
This diff is collapsed.
Click to expand it.
lib/modules/Sql.pmod/pgsql_util.pmod
+
6
−
8
View file @
04e6364a
...
@@ -189,16 +189,15 @@ class bufcon {
...
@@ -189,16 +189,15 @@ class bufcon {
final void sendcmd(int mode,void|sql_result portal) {
final void sendcmd(int mode,void|sql_result portal) {
Thread.MutexKey lock=realbuffer->shortmux->lock();
Thread.MutexKey lock=realbuffer->shortmux->lock();
if(portal)
{
if
(portal)
realbuffer->stashqueue->write(portal);
realbuffer->stashqueue->write(portal);
if (mode == SYNCSEND) {
if (mode == SYNCSEND) {
add(PGSYNC);
add(PGSYNC);
realbuffer->stashqueue->write(1);
realbuffer->stashqueue->write(1);
mode = SENDOUT; // Demote it to prevent an extra SYNC upon stashflush
mode = SENDOUT; // Demote it to prevent an extra SYNC upon stashflush
}
}
}
realbuffer->stash->add(this);
realbuffer->stash->add(this);
PD("%d>
Got s
tash mode %d > %d\n",
PD("%d>
S
tash
ed
mode %d > %d\n",
realbuffer->socket->query_fd(), mode, realbuffer->stashflushmode);
realbuffer->socket->query_fd(), mode, realbuffer->stashflushmode);
if (mode > realbuffer->stashflushmode)
if (mode > realbuffer->stashflushmode)
realbuffer->stashflushmode = mode;
realbuffer->stashflushmode = mode;
...
@@ -387,7 +386,6 @@ outer:
...
@@ -387,7 +386,6 @@ outer:
PD("%d>Skip flush %d Queue %O\n",
PD("%d>Skip flush %d Queue %O\n",
socket->query_fd(), mode, (string)this);
socket->query_fd(), mode, (string)this);
break outer;
break outer;
case FLUSHLOGSEND:
case FLUSHSEND:
case FLUSHSEND:
PD("Flush\n");
PD("Flush\n");
add(PGFLUSH);
add(PGFLUSH);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment