apache / shardingsphere

Distributed SQL transaction & query engine for data sharding, scaling, encryption, and more - on any database.
Apache License 2.0
19.89k stars 6.73k forks source link

Some suggestions about memory mode (in ShardingSphere-JDBC) which has been removed since V5.2.0 according to Issue #19001 #30754

Closed Q2K3 closed 3 months ago

Q2K3 commented 6 months ago

As above, memory mode has been removed since V5.2.0. Using it in V5.2.0 or higher version (not test yet) will get an exception with message below

SPI-00001: No implementation class load from SPI org.apache.shardingsphere.mode.manager.ContextManagerBuilder with type Memory.

Things about why 'memory mode' was suddenly and quietly removed without compatibility are another question to care about later. But now there are some points I want to suggest:

Thks for all contributors in this project and waiting for your response and discussion.

linghengqian commented 6 months ago
Q2K3 commented 6 months ago
  • Isn't this just a common name change? The memory mode is almost equivalent to the h2database storage in the standalone mode, and both use h2database to operate metadata. However, the standalone mode is designed to store metadata in relational databases other than h2database, such as MySQL and TiDB.
  • If you don't understand, you can note Update H2DataBase to 2.x and drop support for H2Database 1.x #19964 . As early as the 5.1.x milestone, the memory mode refers to using h2database to store metadata.
  • If you expect to submit a PR for an old version of the document, this is impossible because the old versions of the document have been sealed as git tags and svn tags and submitted to the ASF side, and no further changes are allowed.

Thks for so fast reply. I get your point that memory mode in the older version is actually a specific state of standalone mode with h2 db, so in the newer version it has been removed. In my situation, I'm using shardingshpere-jdbc-core-spring-boot-starter(V5.2.1) in my springboot project, I follow the official examples which I metioned above to combine data sharding features into my project. And I found those examples In V5.2.0/V5.2.1 still use memory mode in there configuration files.

Then exception I metioned above occured. Then I started searching infomation about memory mode, there has no obivious log infomation about memory mode removing in offcial release log and document. At last, I found some discussion in the issues, then I got memory mode were removed and never used in higher version.

I decide to suggest about clearly writing out that memory mode was replaced by standalone mode in normal and direct place like offcial release log or document, not just in issues list. That's all why I submit this issue.

BYW, I know that code after tagging cannot be changed again, but official examples with obivious errors (like examples in V5.2.0/V5.2.1 still using memory mode) are very confusing. Maybe there can be some way to resolve this situation

linghengqian commented 6 months ago

I decide to suggest about clearly writing out that memory mode was replaced by standalone mode in normal and direct place like offcial release log or document, not just in issues list. That's all why I submit this issue.

BYW, I know that code after tagging cannot be changed again, but official examples with obivious errors (like examples in V5.2.0/V5.2.1 still using memory mode) are very confusing. Maybe there can be some way to resolve this situation

github-actions[bot] commented 5 months ago

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.