Shannon-Data / ShannonBase

A MySQL HTAP Database, Open Source version of MySQL Heatwave, Powered by AI.
https://www.shannonbase.org
Other
16 stars 6 forks source link

Feature: process mlog of loaded table #183

Closed ShannonBase closed 5 months ago

ShannonBase commented 5 months ago

Summary

adding a new condtion to decide whether the changes should be poped or not.

    case SQLCOM_REPLACE_SELECT:
     case SQLCOM_INSERT:
     case SQLCOM_UPDATE:
-    case SQLCOM_DELETE:
-        prebuilt->m_to_pop_buff = true;
+    case SQLCOM_DELETE: {
+      prebuilt->m_to_pop_buff =
+        ShannonBase::shannon_loaded_tables->get(table->s->db.str,
+                     table->s->table_name.str) ? true : false;
+    }break;
RingsC commented 5 months ago

If a table laoded into rapid, now, shannon will launch a pop thread to dealing with the changes. Now, it will route all changes to pop buffer, but these changes donot belong to loaded tables. That's why we add a new cond to check these changes.