dcapwell commented on code in PR #2104:
URL: https://github.com/apache/cassandra/pull/2104#discussion_r1103159966
##########
src/java/org/apache/cassandra/streaming/StreamSession.java:
##########
@@ -694,8 +701,7 @@ public Future<?> onError(Throwable e)
state(State.FAILED); // make sure subsequent error handling sees
the session in a final state
channel.sendControlMessage(new
SessionFailedMessage()).awaitUninterruptibly();
}
-
- return closeSession(State.FAILED);
+ return closeSession(State.FAILED, "Failed because of an exception that
is not an EOF exception;\n" + Throwables.getStackTraceAsString(e));
Review Comment:
I think we should also truncate `Throwables.getStackTraceAsString(e)` as
this is saved in-memory so should be caution on how much we pollute...
The current vtable cache uses
`org.apache.cassandra.streaming.StreamingState#ELEMENT_SIZE` to estimate how
many records it can keep in-memory, but with this stack trace we could produce
a lot more memory than expected which breaks our API (as its how much memory
are we allocating to the cache).
I think we need 2 changes to be safe
1) make this bound, so we don't put too large of stack traces into a long
term store
2) move away from count to weight in
`org.apache.cassandra.streaming.StreamManager#states`. We now have a dynamic
memory cost that should be accounted for, which changes our caching... so
should fix this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]