File tree 2 files changed +3
-26
lines changed
server/src/main/java/org/elasticsearch/common/io/stream
2 files changed +3
-26
lines changed Original file line number Diff line number Diff line change @@ -748,13 +748,6 @@ public <T extends Exception> T readException() throws IOException {
748
748
switch (key ) {
749
749
case 0 :
750
750
final int ord = readVInt ();
751
- // TODO: remove the if branch when master is bumped to 8.0.0
752
- assert Version .CURRENT .major < 8 ;
753
- if (ord == 59 ) {
754
- final ElasticsearchException ex = new ElasticsearchException (this );
755
- final boolean isExecutorShutdown = readBoolean ();
756
- return (T ) new EsRejectedExecutionException (ex .getMessage (), isExecutorShutdown );
757
- }
758
751
return (T ) ElasticsearchException .readException (this , ord );
759
752
case 1 :
760
753
String msg1 = readOptionalString ();
Original file line number Diff line number Diff line change @@ -854,25 +854,9 @@ public void writeException(Throwable throwable) throws IOException {
854
854
} else if (throwable instanceof IOException ) {
855
855
writeVInt (17 );
856
856
} else if (throwable instanceof EsRejectedExecutionException ) {
857
- // TODO: remove the if branch when master is bumped to 8.0.0
858
- assert Version .CURRENT .major < 8 ;
859
- if (version .before (Version .V_7_0_0_alpha1 )) {
860
- /*
861
- * This is a backwards compatibility layer when speaking to nodes that still treated EsRejectedExceutionException as an
862
- * instance of ElasticsearchException. As such, we serialize this in a way that the receiving node would read this as an
863
- * EsRejectedExecutionException.
864
- */
865
- final ElasticsearchException ex = new ElasticsearchException (throwable .getMessage ());
866
- writeVInt (0 );
867
- writeVInt (59 );
868
- ex .writeTo (this );
869
- writeBoolean (((EsRejectedExecutionException ) throwable ).isExecutorShutdown ());
870
- return ;
871
- } else {
872
- writeVInt (18 );
873
- writeBoolean (((EsRejectedExecutionException ) throwable ).isExecutorShutdown ());
874
- writeCause = false ;
875
- }
857
+ writeVInt (18 );
858
+ writeBoolean (((EsRejectedExecutionException ) throwable ).isExecutorShutdown ());
859
+ writeCause = false ;
876
860
} else {
877
861
final ElasticsearchException ex ;
878
862
if (throwable instanceof ElasticsearchException && ElasticsearchException .isRegistered (throwable .getClass (), version )) {
You can’t perform that action at this time.
0 commit comments