8000 Update version info by JinHai-CN · Pull Request #1439 · infiniflow/infinity · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update version info #1439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ if(DEFINED CPACK_PACKAGE_VERSION)
string(REPLACE "-" "." CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
endif()
if(NOT DEFINED CPACK_PACKAGE_VERSION OR CPACK_PACKAGE_VERSION STREQUAL "")
set(CPACK_PACKAGE_VERSION "0.2.1.dev3")
set(CPACK_PACKAGE_VERSION "0.2.1.dev4")
endif()
set(CPACK_PACKAGE_RELEASE 1)
set(CPACK_PACKAGE_CONTACT "Zhichang Yu <yuzhichang@gmail.com>")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Supports a wide range of data types including strings, numerics, vectors, and mo
Infinity, also available as a Python module, eliminates the need for a separate back-end server and all the complex communication settings. Using `pip install` and `import infinity`, you can quickly build a local AI application in Python, leveraging the world's fastest and the most powerful RAG database:

```bash
pip install infinity-sdk==0.2.1.dev3
pip install infinity-sdk==0.2.1.dev4
```

```python
Expand Down
2 changes: 1 addition & 1 deletion benchmark/remote_infinity/remote_query_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct InfinityClient {
transport->open();
CommonResponse response;
ConnectRequest request;
request.__set_client_version(9); // 0.2.1.dev3
request.__set_client_version(9); // 0.2.1.dev4
client->Connect(response, request);
session_id = response.session_id;
}
Expand Down
2 changes: 1 addition & 1 deletion client/cpp/infinity_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Client Client::Connect(const std::string &ip_address, uint16_t port) {
transport->open();
CommonResponse response;
ConnectRequest request;
request.__set_client_version(9); // 0.2.1.dev3
request.__set_client_version(9); // 0.2.1.dev4
client->Connect(response, request);
return {socket, transport, protocol, std::move(client), response.session_id};
}
Expand Down
10 changes: 5 additions & 5 deletions docs/getstarted/deploy_infinity_server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This approach allows you to embed Infinity as a module in a Python application.
### Install Infinity as a module

```
pip install infinity-sdk==0.2.1.dev3
pip install infinity-sdk==0.2.1.dev4
```

### Create an Infinity object
Expand Down Expand Up @@ -98,7 +98,7 @@ If you are on Windows 10+, you must enable WSL or WSL2 to deploy Infinity using
### Install Infinity client

```
pip install infinity-sdk==0.2.1.dev3
pip install infinity-sdk==0.2.1.dev4
```

### Connect to Infinity Server
Expand Down Expand Up @@ -140,14 +140,14 @@ This section provides instructions on deploying Infinity using binary package on

Fedora/RHEL/CentOS/OpenSUSE
```bash
sudo rpm -i infinity-0.2.1.dev3-x86_64.rpm
sudo rpm -i infinity-0.2.1.dev4-x86_64.rpm
sudo systemctl start infinity
```
</TabItem>
<TabItem value="ubuntu">

```bash
sudo dpkg -i infinity-0.2.1.dev3-x86_64.deb
sudo dpkg -i infinity-0.2.1.dev4-x86_64.deb
sudo systemctl start infinity
```

Expand All @@ -157,7 +157,7 @@ sudo systemctl start infinity
### Install Infinity client

```
pip install infinity-sdk==0.2.1.dev3
pip install infinity-sdk==0.2.1.dev4
```

### Connect to Infinity Server
Expand Down
2 changes: 1 addition & 1 deletion docs/getstarted/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Infinity, also available as a Python module, eliminates the need for a separate

1. Install Infinity as a module:
```bash
pip install infinity-sdk==0.2.1.dev3
pip install infinity-sdk==0.2.1.dev4
```
2. Use Infinity to conduct a KNN search:
```python
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build-backend = "scikit_build_core.build"

[project]
name = "infinity_sdk"
version = "0.2.1.dev3"
version = "0.2.1.dev4"
requires-python = ">=3.10"
dependencies = [
"sqlglot~=11.7.0",
Expand Down
2 changes: 1 addition & 1 deletion python/infinity/remote_thrift/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def reconnect(self):
# version: 0.2.0.dev7, client_version: 6
# version: 0.2.0.dev8, client_version: 7
# version: 0.2.0, client_version: 8
# version: 0.2.1.dev3, client_version: 9
# version: 0.2.1.dev4, client_version: 9
res = self.client.Connect(ConnectRequest(client_version=9))
if res.error_code != 0:
raise InfinityException(res.error_code, res.error_msg)
Expand Down
2 changes: 1 addition & 1 deletion src/network/infinity_thrift_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ ClientVersions::ClientVersions() {
client_version_map_[6] = String("0.2.0.dev7");
client_version_map_[7] = String("0.2.0.dev8");
client_version_map_[8] = String("0.2.0");
client_version_map_[9] = String("0.2.1.dev3");
client_version_map_[9] = String("0.2.1.dev4");
}

Pair<const char*, Status> ClientVersions::GetVersionByIndex(i64 version_index) {
Expand Down
2 changes: 1 addition & 1 deletion src/network/infinity_thrift_service.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct ClientVersions {
export class InfinityThriftService final : public infinity_thrift_rpc::InfinityServiceIf {
private:
static constexpr std::string_view ErrorMsgHeader = "[THRIFT ERROR]";
static constexpr i64 current_version_index_{9}; // 0.2.1.dev3
static constexpr i64 current_version_index_{9}; // 0.2.1.dev4

static std::mutex infinity_session_map_mutex_;
static HashMap<u64, SharedPtr<Infinity>> infinity_session_map_;
Expand Down
12 changes: 9 additions & 3 deletions src/storage/txn/txn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ Status Txn::CreateTable(const String &db_name, const SharedPtr<TableDef> &table_

TxnTimeStamp begin_ts = txn_context_.GetBeginTS();

LOG_TRACE("Txn::CreateTable try to insert a created table placeholder on catalog");

auto [table_entry, table_status] = catalog_->CreateTable(db_name, txn_id_, begin_ts, table_def, conflict_type, txn_mgr_);

if (table_entry == nullptr) {
Expand All @@ -238,6 +240,7 @@ Status Txn::CreateTable(const String &db_name, const SharedPtr<TableDef> &table_
txn_store_.AddTableStore(table_entry);
wal_entry_->cmds_.push_back(MakeShared<WalCmdCreateTable>(std::move(db_name), table_entry->GetPathNameTail(), table_def));

LOG_TRACE("Txn::CreateTable created table entry is inserted.");
return Status::OK();
}

Expand All @@ -246,6 +249,7 @@ Status Txn::DropTableCollectionByName(const String &db_name, const String &table

TxnTimeStamp begin_ts = txn_context_.GetBeginTS();

LOG_TRACE("Txn::DropTableCollectionByName try to insert a dropped table placeholder on catalog");
auto [table_entry, table_status] = catalog_->DropTableByName(db_name, table_name, conflict_type, txn_id_, begin_ts, txn_mgr_);

if (table_entry.get() == nullptr) {
Expand All @@ -254,6 +258,8 @@ Status Txn::DropTableCollectionByName(const String &db_name, const String &table

txn_store_.DropTableStore(table_entry.get());
wal_entry_->cmds_.push_back(MakeShared<WalCmdDropTable>(db_name, table_name));

LOG_TRACE("Txn::DropTableCollectionByName dropped table entry is inserted.");
return Status::OK();
}

Expand Down Expand Up @@ -457,10 +463,10 @@ TxnTimeStamp Txn::Commit() {
return commit_ts;
}

bool Txn::CheckConflict(Txn *txn) {
LOG_TRACE(fmt::format("Txn {} check conflict with {}.", txn_id_, txn->txn_id_));
bool Txn::CheckConflict(Txn *other_txn) {
LOG_TRACE(fmt::format("Txn {} check conflict with {}.", txn_id_, other_txn->txn_id_));

return txn_store_.CheckConflict(txn->txn_store_);
return txn_store_.CheckConflict(other_txn->txn_store_);
}

void Txn::CommitBottom() {
Expand Down
2 changes: 1 addition & 1 deletion src/storage/txn/txn_context.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public:
inline void SetTxnRollbacking(TxnTimeStamp rollback_ts) {
std::unique_lock<std::shared_mutex> w_locker(rw_locker_);
if (state_ != TxnState::kCommitting && state_ != TxnState::kStarted) {
String error_message = "Transaction isn't in TO_ROLLBACK status.";
String error_message = fmt::format("Transaction is in {} status, which can't rollback.", ToString(state_));
LOG_CRITICAL(error_message);
UnrecoverableError(error_message);
}
Expand Down
4 changes: 4 additions & 0 deletions src/storage/txn/txn_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@ void TxnManager::FinishTxn(Txn *txn) {
txn->SetTxnCommitted(finished_ts);
} else if (state == TxnState::kRollbacking) {
txn->SetTxnRollbacked();
} else {
String error_message = fmt::format("Invalid transaction status: {}", ToString(state));
LOG_CRITICAL(error_message);
UnrecoverableError(error_message);
}

TxnTimeStamp least_uncommitted_begin_ts = txn->CommitTS() + 1;
Expand Down
9 changes: 5 additions & 4 deletions src/storage/txn/txn_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,18 +498,19 @@ void TxnStore::MaintainCompactionAlg() const {
}
}

bool TxnStore::CheckConflict(const TxnStore &txn_store) {
bool TxnStore::CheckConflict(const TxnStore &other_txn_store) {
for (const auto &[table_name, table_store] : txn_tables_store_) {
for (const auto [table_entry, _] : txn_store.txn_tables_) {
for (const auto [table_entry, _] : other_txn_store.txn_tables_) {
if (table_name == *table_entry->GetTableName()) {
return true;
}
}

auto other_iter = txn_store.txn_tables_store_.find(table_name);
if (other_iter == txn_store.txn_tables_store_.end()) {
auto other_iter = other_txn_store.txn_tables_store_.find(table_name);
if (other_iter == other_txn_store.txn_tables_store_.end()) {
continue;
}

const TxnTableStore *other_table_store = other_iter->second.get();
if (table_store->CheckConflict(other_table_store)) {
return true;
Expand Down
Loading
0