These three fixes need to be made to ContentFeatureStore to support CSV datastore:
1. removeFeatures() has this loop:
but it really should look like this:
The writer.write() should not be there.
2. ContentFeatureStore.getWriter(Query, int) needs to have (at least) a FilteringWriter. See attached patch.
3. There's a minor tweak in ContentFeatureStore.getWriter(Filter, int). Instead of "new DefaultQuery(..." it should be "new Query(.." – DefaultQuery is deprecated.