Skip to content

3.x: stop throwing log message on zero token nodes #520

Description

@dkropachev

Currently driver logs warning message on every metadata update for each zero token node:

9932   [main] WARN  com.datastax.driver.core.ControlConnection - Found invalid row in system.peers: [peer=/127.0.1.3, missing native_transport_address, missing native_transport_port, missing native_transport_port_ssl, tokens=null]. This is likely a gossip or snitch issue, this host will be ignored.

It produce bad UX, we need to stop doing that.

Activity

  1. self-assigned this
    on Apr 15, 2025
  2. added
    bug
    on Apr 15, 2025
  3. added theissue type on Apr 15, 2025
  4. changed the issue type fromtoon Apr 15, 2025
  5. added
    enhancement
    and removed
    bug
    on Apr 15, 2025
  6. dkropachev commented on Apr 15, 2025

    @dkropachev
    Author

    It was missed when we where working on #317 for 3.x

  7. Bouncheck commented on Apr 16, 2025

    @Bouncheck

    Isn't it logged only when option is not enabled? Looks to me like it will be logged only if it is supposed to be considered invalid

    if (EXTENDED_PEER_CHECK) {
    isValid &=
    peerRow.getColumnDefinitions().contains("data_center")
    && !peerRow.isNull("data_center")
    && peerRow.getColumnDefinitions().contains("rack")
    && !peerRow.isNull("rack")
    && peerRow.getColumnDefinitions().contains("tokens")
    && (!peerRow.isNull("tokens")
    || cluster
    .configuration
    .getQueryOptions()
    .shouldConsiderZeroTokenNodesValidPeers());
    }
    if (!isValid && logIfInvalid)
    logger.warn(
    "Found invalid row in system.peers: {}. "
    + "This is likely a gossip or snitch issue, this host will be ignored.",
    formatInvalidPeer(peerRow));
    return isValid;
    }

  8. dkropachev commented on Apr 16, 2025

    @dkropachev
    Author

    Say you have a cluster with zero token nodes, but you don't want your driver connect to them.
    Then shouldConsiderZeroTokenNodesValidPeers is false, but you are getting log messages on every metadata update.
    It is a bad UX, we should silently skip them.

  9. dkropachev commented on May 20, 2025

    @dkropachev
    Author

    Fixed - #519

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions