Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
cld
systems
cassandra
Commits
66cd0324
Commit
66cd0324
authored
Jun 09, 2020
by
Brandon Williams
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Make sure topology events are sent to clients when using a single network interface"
This reverts commit
595a4528
.
parent
595a4528
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
65 deletions
+4
-65
CHANGES.txt
CHANGES.txt
+0
-1
build.xml
build.xml
+0
-3
src/java/org/apache/cassandra/transport/Event.java
src/java/org/apache/cassandra/transport/Event.java
+2
-2
src/java/org/apache/cassandra/transport/Server.java
src/java/org/apache/cassandra/transport/Server.java
+2
-2
test/distributed/org/apache/cassandra/distributed/test/NodeDecommissionTest.java
...ache/cassandra/distributed/test/NodeDecommissionTest.java
+0
-57
No files found.
CHANGES.txt
View file @
66cd0324
4.0-alpha5
* Fix missing topology events when running multiple nodes on the same network interface (CASSANDRA-15677)
* Create config.yml.MIDRES (CASSANDRA-15712)
* Fix handling of fully purged static rows in repaired data tracking (CASSANDRA-15848)
* Prevent validation request submission from blocking ANTI_ENTROPY stage (CASSANDRA-15812)
...
...
build.xml
View file @
66cd0324
...
...
@@ -633,7 +633,6 @@
<dependency
groupId=
"com.beust"
artifactId=
"jcommander"
version=
"1.30"
/>
<!-- when updating assertj, make sure to also update the corresponding junit-bom dependency -->
<dependency
groupId=
"org.assertj"
artifactId=
"assertj-core"
version=
"3.15.0"
/>
<dependency
groupId=
"org.awaitility"
artifactId=
"awaitility"
version=
"4.0.3"
/>
</dependencyManagement>
<developer
id=
"adelapena"
name=
"Andres de la Peña"
/>
...
...
@@ -719,7 +718,6 @@
this that the new assertj's `assertj-parent-pom` depends on. -->
<dependency
groupId=
"org.junit"
artifactId=
"junit-bom"
version=
"5.6.0"
type=
"pom"
/>
<dependency
groupId=
"org.assertj"
artifactId=
"assertj-core"
/>
<dependency
groupId=
"org.awaitility"
artifactId=
"awaitility"
/>
</artifact:pom>
<!-- this build-deps-pom-sources "artifact" is the same as build-deps-pom but only with those
artifacts that have "-source.jar" files -->
...
...
@@ -739,7 +737,6 @@
<dependency
groupId=
"net.ju-n.compile-command-annotations"
artifactId=
"compile-command-annotations"
/>
<dependency
groupId=
"org.apache.ant"
artifactId=
"ant-junit"
version=
"1.9.7"
/>
<dependency
groupId=
"org.assertj"
artifactId=
"assertj-core"
/>
<dependency
groupId=
"org.awaitility"
artifactId=
"awaitility"
/>
</artifact:pom>
<artifact:pom
id=
"coverage-deps-pom"
...
...
src/java/org/apache/cassandra/transport/Event.java
View file @
66cd0324
...
...
@@ -90,9 +90,9 @@ public abstract class Event
{
public
final
InetSocketAddress
node
;
public
InetAddress
AndPort
nodeAddress
AndPort
()
public
InetAddress
nodeAddress
()
{
return
InetAddressAndPort
.
getByAddressOverrideDefaults
(
node
.
getAddress
(),
node
.
getPort
()
);
return
node
.
getAddress
(
);
}
private
NodeEvent
(
Type
type
,
InetSocketAddress
node
)
...
...
src/java/org/apache/cassandra/transport/Server.java
View file @
66cd0324
...
...
@@ -613,7 +613,7 @@ public class Server implements CassandraDaemon.Server
private
void
send
(
InetAddressAndPort
endpoint
,
Event
.
NodeEvent
event
)
{
if
(
logger
.
isTraceEnabled
())
logger
.
trace
(
"Sending event for endpoint {}, rpc address {}"
,
endpoint
,
event
.
nodeAddress
AndPort
());
logger
.
trace
(
"Sending event for endpoint {}, rpc address {}"
,
endpoint
,
event
.
nodeAddress
());
// If the endpoint is not the local node, extract the node address
// and if it is the same as our own RPC broadcast address (which defaults to the rcp address)
...
...
@@ -621,7 +621,7 @@ public class Server implements CassandraDaemon.Server
// which is not useful to any driver and in fact may cauase serious problems to some drivers,
// see CASSANDRA-10052
if
(!
endpoint
.
equals
(
FBUtilities
.
getBroadcastAddressAndPort
())
&&
event
.
nodeAddress
AndPort
().
equals
(
FBUtilities
.
getBroadcastNativeAddress
AndPort
()))
event
.
nodeAddress
().
equals
(
FBUtilities
.
get
Just
BroadcastNativeAddress
()))
return
;
send
(
event
);
...
...
test/distributed/org/apache/cassandra/distributed/test/NodeDecommissionTest.java
deleted
100644 → 0
View file @
595a4528
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.apache.cassandra.distributed.test
;
import
java.util.concurrent.TimeUnit
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
com.datastax.driver.core.Session
;
import
org.apache.cassandra.distributed.Cluster
;
import
static
org
.
apache
.
cassandra
.
distributed
.
api
.
Feature
.
GOSSIP
;
import
static
org
.
apache
.
cassandra
.
distributed
.
api
.
Feature
.
NATIVE_PROTOCOL
;
import
static
org
.
apache
.
cassandra
.
distributed
.
api
.
Feature
.
NETWORK
;
import
static
org
.
apache
.
cassandra
.
distributed
.
impl
.
INodeProvisionStrategy
.
Strategy
.
OneNetworkInterface
;
import
static
org
.
awaitility
.
Awaitility
.
await
;
public
class
NodeDecommissionTest
extends
TestBaseImpl
{
@Test
public
void
testDecomissionSucceedsForNodesOnTheSameInterface
()
throws
Throwable
{
try
(
Cluster
control
=
init
(
Cluster
.
build
().
withNodes
(
3
).
withNodeProvisionStrategy
(
OneNetworkInterface
).
withConfig
(
config
->
{
config
.
with
(
GOSSIP
,
NETWORK
,
NATIVE_PROTOCOL
);
}).
start
()))
{
final
com
.
datastax
.
driver
.
core
.
Cluster
cluster
=
com
.
datastax
.
driver
.
core
.
Cluster
.
builder
().
addContactPoint
(
"127.0.0.1"
).
build
();
Session
session
=
cluster
.
connect
();
control
.
get
(
3
).
nodetool
(
"disablebinary"
);
control
.
get
(
3
).
nodetool
(
"decommission"
,
"-f"
);
await
().
atMost
(
10
,
TimeUnit
.
SECONDS
)
.
untilAsserted
(()
->
Assert
.
assertEquals
(
2
,
cluster
.
getMetadata
().
getAllHosts
().
size
()));
session
.
close
();
cluster
.
close
();
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment