You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the release_version column exists in the system.peers table and has the right type, but the value is not being set when producing the result for queries. Therefore its value is always returned as null.
Example
Start a cluster locally with:
./bin/yb-ctl create --rf 3
Connect with ycqlsh
./bin/ycqlsh
Check release version in system.local (should be set correctly)
select key, broadcast_address, release_version from system.local ;
The YCQL system tables are implemented as virtual tables, and the results for them are constructed in code.
Specifically for system.local the release version is set in yql_local_vtable.cc:LocalVTable::RetrieveData.
On the other hand for system.peers the column is indeed created in yql_peers_vtable.cc:PeersVTable::CreateSchema.
But its value is not set in yql_peers_vtable.cc:PeersVTable::RetrieveData.
Fix should be to set the value accordingly (also the value "3.9-SNAPSHOT" should probably become a const in a shared place like yql_local_vtable for code cleanliness).
Testing
The main test for YCQL system tables is TestSystemTables.java so we should add a test for this there (probably extend an existing test to check this value).
Note: the test can be ran using:
ybd --java-test org.yb.cql.TestSystemTables
The text was updated successfully, but these errors were encountered:
Summary:
Currently the release_version column exists in the system.peers table and has the right type, but the value
is not being set when producing the result for queries. Therefore its value is always returned as null.
For system.peers the column is indeed created in yql_peers_vtable.cc:PeersVTable::CreateSchema.
But its value is not set in yql_peers_vtable.cc:PeersVTable::RetrieveData.
This change sets the value accordingly.
Test Plan: Added assertion in TestSystemTables.java
Reviewers: mihnea
Reviewed By: mihnea
Subscribers: kannan, yql, ybase, bogdan
Differential Revision: https://phabricator.dev.yugabyte.com/D9181
Currently the
release_version
column exists in thesystem.peers
table and has the right type, but the value is not being set when producing the result for queries. Therefore its value is always returned asnull
.Example
Start a cluster locally with:
Connect with ycqlsh
Check release version in system.local (should be set correctly)
Check release version in system.peers (will be null)
Relevant code
The YCQL system tables are implemented as virtual tables, and the results for them are constructed in code.
Specifically for
system.local
the release version is set in yql_local_vtable.cc:LocalVTable::RetrieveData.On the other hand for
system.peers
the column is indeed created in yql_peers_vtable.cc:PeersVTable::CreateSchema.But its value is not set in yql_peers_vtable.cc:PeersVTable::RetrieveData.
Fix should be to set the value accordingly (also the value
"3.9-SNAPSHOT"
should probably become a const in a shared place likeyql_local_vtable
for code cleanliness).Testing
The main test for YCQL system tables is TestSystemTables.java so we should add a test for this there (probably extend an existing test to check this value).
Note: the test can be ran using:
The text was updated successfully, but these errors were encountered: