I could not quickly find which test does specifically this, but you could induce schema disagreements with dtests in two ways, from the top of my head:
1. dtests with verb filters; disabling schema mutations 2. by executing schema statements with NODE_LOCAL / executeInternal on the node rather than going through coordinated path Hope this helps On Fri, Aug 12, 2022, at 8:30 PM, Cheng Wang via dev wrote: > Thank you, Jeff, now it works for me and I can reproduce a schema > disagreement. > The testing logic is like: > On node 1: > start the node 1 > create table > shutdown the node 1 > > Node node 2: > start the node 1 > create table > shutdown the node 2 > > Then startup the two nodes and check the schema version Id > > Now it seems that with the deterministic table id, the schema versions on the > two nodes were different initially, even though table ids are the same, and > they reached an agreement at some point. Is it as expected? > > I am just wondering, is there any other way to re-sync the shema versions > without restarting the node, cause I feel that shutdown/start is quite > expensive and flaky since the schema migration is a background task? > > Thanks > Cheng > > On Tue, Aug 9, 2022 at 12:12 PM Jeff Jirsa <jji...@gmail.com> wrote: >> Stop node 1 before you start node 2, essentially mocking a full network >> partition. >> >> >> >> On Tue, Aug 9, 2022 at 11:57 AM Cheng Wang via dev >> <dev@cassandra.apache.org> wrote: >>> Thank you, Aleksey, >>> Yes, I have tried this approach, the problem is there is a timing window >>> that node 1 runs the CREATE TABLE while node 2 is down, and then we bring >>> up the node 2 and it may receive the gossip from node 1 at startup, and the >>> CREATE TABLE will fail on node 2 since the table already exists? >>> >>> >>> >>> On Tue, Aug 9, 2022 at 4:48 AM Aleksey Yeshchenko <alek...@apple.com> wrote: >>>> The absolute easiest way would be to down one of the two nodes first, >>>> run CREATE TABLE on the live node, shut it down, get the other one up, >>>> and run the same CREATE TABLE there, the bring up the down node. >>>> >>>> > On 9 Aug 2022, at 07:48, Konstantin Osipov via dev >>>> > <dev@cassandra.apache.org> wrote: >>>> > >>>> > * Cheng Wang via dev <dev@cassandra.apache.org> [22/08/09 09:43]: >>>> > >>>> >> I am working on improving the schema disagreement issue. I need some >>>> >> dtests >>>> >> which can reproduce the schema disagreement. Anyone know if there are >>>> >> any >>>> >> existing tests for that? Or something similar? >>>> > >>>> > cassandra-10250 is a good start. >>>> > >>>> > -- >>>> > Konstantin Osipov, Moscow, Russia >>>>