Merging
This commit is contained in:
1 parent
15fc3cb785
commit
2bb7a89777
11 files changed
+188
-149
No files matched your search
@@ -51,13 +51,13 @@ namespace BCG {
|
||||
public virtual void make_batch_changes(IBlueRowCollection new_rows,
|
||||
IBlueRowCollection del_rows,
|
||||
IBlueRowCollection added_rows) {
|
||||
string log_msg = $"PubTableBroker.make_batch_changes table: {new_rows.schema.tableName} del: {del_rows.Count} added: {added_rows.Count}";
|
||||
foreach (IBlueRow r in del_rows)
|
||||
log_msg += $"id: {r["id"]} ";
|
||||
log_msg += "addedRows: ";
|
||||
foreach (IBlueRow r in added_rows)
|
||||
log_msg += $"id: {r["id"]}";
|
||||
bts.Log.Gen.info(log_msg);
|
||||
// string log_msg = $"PubTableBroker.make_batch_changes table: {new_rows.schema.tableName} del: {del_rows.Count} added: {added_rows.Count}";
|
||||
// foreach (IBlueRow r in del_rows)
|
||||
// log_msg += $"id: {r["id"]} ";
|
||||
// log_msg += "addedRows: ";
|
||||
// foreach (IBlueRow r in added_rows)
|
||||
// log_msg += $"id: {r["id"]}";
|
||||
// bts.Log.Gen.info(log_msg);
|
||||
SinglePubTableBroker table_publisher = null;
|
||||
var name_key = new_rows.schema.tableName.ToLower();
|
||||
if (!_publisher_map.TryGetValue(name_key, out table_publisher))
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace BCG
|
||||
foreach (var msg in msgs)
|
||||
{
|
||||
bts.StreamIOMessage str_msg = _deser.deserialize(msg);
|
||||
var state_txt = _table == null ? "NULL" : BlueDataUtility.id_string(_table);
|
||||
var state_txt = _table == null ? "NULL" : _table.Count.ToString();// BlueDataUtility.id_string(_table);
|
||||
Log.Gen.info($"TableAccumulator2.handle_update tag: {_tag} sz: {msg.Length} str_msg: {str_msg} _state: {state_txt}");
|
||||
switch (str_msg.op)
|
||||
{
|
||||
|
||||
+4
-4
@@ -95,8 +95,8 @@ namespace bts {
|
||||
}
|
||||
|
||||
public static IBlueTableSchema deserialize_schema(ref BinaryReader br) {
|
||||
var hex_txt = to_hex(br.BaseStream);
|
||||
bts.Log.Gen.info($"StreamSerializationUtils.deserialize_schema bytes: {hex_txt}");
|
||||
// var hex_txt = to_hex(br.BaseStream);
|
||||
// bts.Log.Gen.info($"StreamSerializationUtils.deserialize_schema bytes: {hex_txt}");
|
||||
string table_name = br.read_string_cpp();
|
||||
int n_cols = br.ReadInt32(); // doing a br.Read was only advancing the data 1 byte!!
|
||||
List<ColumnInfo> cis = new List<ColumnInfo>();
|
||||
@@ -137,8 +137,8 @@ namespace bts {
|
||||
|
||||
public static ColumnInfo deserialize_column_info(ref BinaryReader br) {
|
||||
//col_no, name, type>
|
||||
var hex_txt = to_hex(br.BaseStream);
|
||||
bts.Log.Gen.info($"StreamSerializationUtils.deserialize_column_info bytes: {hex_txt}");
|
||||
// var hex_txt = to_hex(br.BaseStream);
|
||||
// bts.Log.Gen.info($"StreamSerializationUtils.deserialize_column_info bytes: {hex_txt}");
|
||||
int col_no = br.ReadInt32();
|
||||
string col_name = br.read_string_cpp();
|
||||
int tc_int = br.ReadInt32();
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ namespace bts {
|
||||
public void update(string tag, byte[] msg) {
|
||||
StreamIOMessage str_msg = _deser.deserialize(msg);
|
||||
var state_txt = _state == null ? "NULL" : _state.Count.ToString();
|
||||
Log.Gen.info($"PubsubServerSingleStreamTagHandler.update (pre.1) tag: {tag} sz: {msg.Length} str_msg: {str_msg} _state: {state_txt}");
|
||||
Log.Gen.info($"PubsubServerSingleStreamTagHandler.update (pre.1) tag: {tag} sz: {msg.Length} _state: {state_txt}");
|
||||
switch (str_msg.op) {
|
||||
case StreamIOMessage.StreamOp.CREATE:
|
||||
//Log.assert(_state == null);
|
||||
@@ -56,7 +56,7 @@ namespace bts {
|
||||
_state.addRows(str_msg.multiple_remove_add_message.added_rows);
|
||||
break;
|
||||
}
|
||||
Log.Gen.info($"PubsubServerSingleStreamTagHandler.update (post) tag: {tag} sz: {msg.Length} str_msg: {str_msg} state: {_state.Count}");
|
||||
Log.Gen.info($"PubsubServerSingleStreamTagHandler.update (post) tag: {tag} sz: {msg.Length} state: {_state.Count}");
|
||||
}
|
||||
|
||||
public byte[] get_content(string tag) {
|
||||
|
||||
Reference in new issue
Block a user