First, I understand the use case, and I think it's a really important feature. In fact, it was one of the major features I added to the Bluge project when I forked that off of Bleve earlier this year.
Second, that highlights the second main point, the technical part of the solution is relatively straightforward, and already coded in Bluge. Basically we can't use BoltDB to store the snapshots, because it's limitations prevent this use case. Instead we write every snapshot to its own file. Easier side is recording the snapshots, but removing unneeded snapshots is a bit more work now. Finally, the writing process (responsible for removing old snapshots) needs to be prevented from removing snapshots still being read by other read-only processes, and this means we need to use OS-provided file-locking features. As I said, this is all coded, basically working, just not production-level tested in the Bluge project at this time.
Porting these changes to Bleve has 3 main problems:
1. Unlike Bluge, Bleve requires some level of backwards compatibility. So at a minimum we have to keep support for the old snapshots with Bolt and introduce this new way on the side. And this adds to the testing effort as well.
2. The ONLY people paying me to work on Bleve right do not require this feature, so they're unlikely to ever prioritize it.
3. The ONLY people paying me to work on Bleve right now would see this as a high-risk change that actively gets in the way of their actual priorities.
This is unfortunate. I have spent the last 18 months trying to diversify the financial support of Bleve, specifically to avoid these kinds of situations. They are not healthy for the project as a whole, but this is the situation we're in.
So, then why remove upsidedown at all? It seems to still work for people, and even supports use-cases not covered by scorch!
To me, the problem is best illustrated with the RocksDB adapter.
1. No one on the team had even tried to build this for at least a year, possibly longer. In the course of preparing our upcoming 2.0 release, we needed to move the blevex (extensions) project to Go modules, to ensure there would be an easily tagged/usable version of it before introducing any 2.x changes. Because we don't want to drop support immediately, we want to deprecate first and remove later. At this point, I discovered that it didn't build. If you took the latest version of our bleve adapter, the latest version of the RocksDB adapter we use (
github.com/tecbot/gorocksdb) and the latest version of RocksDB, it does not build. There is obviously some combination of older versions that work (you're using it happily), but we don't even know what this is.
2. Fixing the compilation issues does not appear difficult, but likely breaks support for the older versions that we now know some people are using successfully (you!) Maybe it's not a big deal if RocksDB compatibility is good, or maybe it's a nightmare causing some to reindex everything, again, we have no idea, we don't use this thing.
3. Even after fixing the compilation issues, there is now a linking issue as well. It turns out we don't just use the RocksDB adapter, we also have some of our own cgo code which optimizes a common path. (There is a cost whenever you cross the c-go boundary, which can be amortized by batching differently, and back in the day we wrote the c code to do this, with a cgo wrapper) But, a few of the functions we used, no longer exist in RocksDB. It might just be that they were renamed, not removed, it wasn't immediately clear to me. I didn't spend much time on it because I have no intention of fixing this. This type of cgo code, where we're sharing data with raw pointers across the boundary is tricky, and the rules have changed (stricter) with recent Go releases. My point is that it is likely this code either needs updating or a rewrite anyway, and again, no one here is qualified to do it, let alone motivated to care.
And this, in a nutshell is the problem with upsidedown. It, plus the adapters, are this huge chunk of code that seems to work OK most of the time, but just under the surface you realize it's not properly maintained or supported. In that sense, deprecating them is not really a change, it's just us being honest about the current state of affairs.
marty