If I understand the code in [CoGroupedRDD](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/rdd/CoGroupedRDD.scala#L84) correctly, every time a CoGrouped RDD is created (join uses cogroup underneath), a new dependency object is created. So even though rddA and rddB depend on the same rdd1, they should not be sharing the shuffle dependency. 

Regarding the new code snippet, yes, that would result in problems for rdd2. But that can also be done currently with rdd1.unpersist().