This is an automated email from the ASF dual-hosted git repository.
brandonwilliams pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/cassandra-3.0 by this push:
new 75e0e8c Fix cqlsh COPY abort on window resize
75e0e8c is described below
commit 75e0e8cf41f8cac1a8d6abf5b19dba9968cb4316
Author: Johannes Weißl <[email protected]>
AuthorDate: Tue Jul 16 22:58:21 2019 +0200
Fix cqlsh COPY abort on window resize
Patch by Johannes Weißl; reviewed by brandonwilliams and bereng for
CASSANDRA-15230
---
CHANGES.txt | 1 +
pylib/cqlshlib/copyutil.py | 13 +++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 6ed2033..20fbb32 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
3.0.26:
+ * Fix abort when window resizing during cqlsh COPY (CASSANDRA-15230)
* Fix slow keycache load which blocks startup for tables with many sstables
(CASSANDRA-14898)
* Fix rare NPE caused by batchlog replay / node decomission races
(CASSANDRA-17049)
* Allow users to view permissions of the roles they created (CASSANDRA-16902)
diff --git a/pylib/cqlshlib/copyutil.py b/pylib/cqlshlib/copyutil.py
index 987a125..9692db5 100644
--- a/pylib/cqlshlib/copyutil.py
+++ b/pylib/cqlshlib/copyutil.py
@@ -31,6 +31,8 @@ import sys
import threading
import time
import traceback
+import select
+import errno
from bisect import bisect_right
from calendar import timegm
@@ -39,7 +41,6 @@ from decimal import Decimal
from Queue import Queue
from random import randint
from StringIO import StringIO
-from select import select
from uuid import UUID
from util import profile_on, profile_off
@@ -191,7 +192,15 @@ class ReceivingChannels(object):
Implementation of the recv method for Linux, where select is
available. Receive an object from
all pipes that are ready for reading without blocking.
"""
- readable, _, _ = select(self._readers, [], [], timeout)
+ while True:
+ try:
+ readable, _, _ = select.select(self._readers, [], [], timeout)
+ except select.error, exc:
+ # Do not abort on window resize:
+ if exc[0] != errno.EINTR:
+ raise
+ else:
+ break
for r in readable:
with self._rlocks_by_readers[r]:
try:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]