Skip to content

Commit

Permalink
Merge pull request Aiven-Open#920 from Aiven-Open/jjaakola-aiven-chan…
Browse files Browse the repository at this point in the history
…ge-schema-coordinator-error-logs-to-warning

fix: change schema coordinator error logs to warning
  • Loading branch information
keejon authored Jul 24, 2024
2 parents e5a6e41 + 66bf05a commit 83e329a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions karapace/coordinator/schema_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ async def send_req(self, request: Request) -> Response:
try:
resp = await self._client.send(node_id, request, group=ConnectionGroup.COORDINATION)
except Errors.KafkaError as err:
LOG.error(
LOG.warning(
"Error sending %s to node %s [%s] -- marking coordinator dead", request.__class__.__name__, node_id, err
)
self.coordinator_dead()
Expand Down Expand Up @@ -277,7 +277,7 @@ async def _maybe_leave_group(self) -> None:
try:
await self.send_req(request)
except Errors.KafkaError as err:
LOG.error("LeaveGroup request failed: %s", err)
LOG.warning("LeaveGroup request failed: %s", err)
else:
LOG.info("LeaveGroup request succeeded")
self.reset_generation()
Expand Down Expand Up @@ -472,7 +472,7 @@ async def ensure_coordinator_known(self) -> None:
err = Errors.GroupAuthorizationFailedError(self.group_id)
raise err from exc
except Errors.KafkaError as err:
LOG.error("Group Coordinator Request failed: %s", err)
LOG.warning("Group Coordinator Request failed: %s", err)
if err.retriable:
await self._client.force_metadata_update()
await asyncio.sleep(retry_backoff)
Expand Down Expand Up @@ -628,7 +628,7 @@ async def _heartbeat_routine(self) -> None:
# the session timeout has expired without seeing a successful
# heartbeat, so we should probably make sure the coordinator
# is still healthy.
LOG.error("Heartbeat session expired - marking coordinator dead")
LOG.warning("Heartbeat session expired - marking coordinator dead")
self.coordinator_dead()

LOG.debug("Stopping heartbeat task")
Expand All @@ -643,7 +643,7 @@ async def _do_heartbeat(self) -> bool:
try:
resp = await self.send_req(request)
except Errors.KafkaError as err:
LOG.error("Heartbeat send request failed: %s. Will retry.", err)
LOG.warning("Heartbeat send request failed: %s. Will retry.", err)
return False
error_type = Errors.for_code(resp.error_code)
if error_type is Errors.NoError:
Expand Down Expand Up @@ -676,7 +676,7 @@ async def _do_heartbeat(self) -> bool:
raise error_type(self.group_id)
else:
kafka_error = Errors.KafkaError(f"Unexpected exception in heartbeat task: {error_type()!r}")
LOG.error("Heartbeat failed: %r", kafka_error)
LOG.warning("Heartbeat failed: %r", kafka_error)
raise kafka_error
return False

Expand Down

0 comments on commit 83e329a

Please sign in to comment.