Comments (4)
We do not support it at this point - doing range_queries in read in cluster - closing
from scylladb.
On Wed, Jul 15, 2015 at 09:31:05AM -0700, slivne wrote:
We do not support it at this point - doing range_queries in read in cluster - closing
The crash has nothing to do with range_queries read in cluster though.
It crashes in deserializer because it uses assign operator instead of
placement new. This patch should fix the crash:
diff --git a/mutation_query.cc b/mutation_query.cc
index 50b6f27..539dd1e 100644
--- a/mutation_query.cc
+++ b/mutation_query.cc
@@ -87,7 +87,7 @@ void db::serializer<reconcilable_result>::read(reconcilable_result& v, input& in
auto fm = db::frozen_mutation_serializer::read(in);
partitions.emplace_back(partition(p_row_count, std::move(fm)));
}
- v = reconcilable_result(row_count, std::move(partitions));
- new (&v) reconcilable_result(row_count, std::move(partitions));
}
future<reconcilable_result>
Gleb.
from scylladb.
2015-07-15 18:49 GMT+02:00 Gleb Natapov [email protected]:
On Wed, Jul 15, 2015 at 09:31:05AM -0700, slivne wrote:
We do not support it at this point - doing range_queries in read in
cluster - closingThe crash has nothing to do with range_queries read in cluster though.
It crashes in deserializer because it uses assign operator instead of
placement new. This patch should fix the crash:diff --git a/mutation_query.cc b/mutation_query.cc
index 50b6f27..539dd1e 100644
--- a/mutation_query.cc
+++ b/mutation_query.cc
@@ -87,7 +87,7 @@ void
db::serializer<reconcilable_result>::read(reconcilable_result& v, input& in
auto fm = db::frozen_mutation_serializer::read(in);
partitions.emplace_back(partition(p_row_count, std::move(fm)));
}
- v = reconcilable_result(row_count, std::move(partitions));
- new (&v) reconcilable_result(row_count, std::move(partitions));
The output of db::serializer::read() is not said to be uninitialized,
there's this for example:
template<>
void db::serializer::read(sstring& s, input& in) {
s = in.read();
}
The fix could be in net::serializer::read_serializable(), but it assumes
that values are movable:
diff --git a/message/messaging_service.hh b/message/messaging_service.hh
index 2a3033d..897969b 100644
--- a/message/messaging_service.hh
+++ b/message/messaging_service.hh
@@ -136,7 +136,7 @@ struct serializer {
}
bytes_view bv(reinterpret_cast<const int8_t*>(buf.get()),
sz);
data_input in(bv);
-
db::serializer<Serializable>::read(v, in);
-
}
new (&v) (db::serializer<Serializable>::read(in)); }); });
Or we could align db::serializer<>::read() so that they're like rpc
deserializers wrt to output parameter.
from scylladb.
On Wed, Jul 15, 2015 at 10:09:07AM -0700, Tomasz Grabiec wrote:
2015-07-15 18:49 GMT+02:00 Gleb Natapov [email protected]:
On Wed, Jul 15, 2015 at 09:31:05AM -0700, slivne wrote:
We do not support it at this point - doing range_queries in read in
cluster - closingThe crash has nothing to do with range_queries read in cluster though.
It crashes in deserializer because it uses assign operator instead of
placement new. This patch should fix the crash:diff --git a/mutation_query.cc b/mutation_query.cc
index 50b6f27..539dd1e 100644
--- a/mutation_query.cc
+++ b/mutation_query.cc
@@ -87,7 +87,7 @@ void
db::serializer<reconcilable_result>::read(reconcilable_result& v, input& in
auto fm = db::frozen_mutation_serializer::read(in);
partitions.emplace_back(partition(p_row_count, std::move(fm)));
}
- v = reconcilable_result(row_count, std::move(partitions));
- new (&v) reconcilable_result(row_count, std::move(partitions));
The output of db::serializer::read() is not said to be uninitialized,
there's this for example:template<>
void db::serializer::read(sstring& s, input& in) {
s = in.read();
}The fix could be in net::serializer::read_serializable(), but it assumes
that values are movable:diff --git a/message/messaging_service.hh b/message/messaging_service.hh
index 2a3033d..897969b 100644
--- a/message/messaging_service.hh
+++ b/message/messaging_service.hh
@@ -136,7 +136,7 @@ struct serializer {
}
bytes_view bv(reinterpret_cast<const int8_t*>(buf.get()),
sz);
data_input in(bv);
db::serializer<Serializable>::read(v, in);
}new (&v) (db::serializer<Serializable>::read(in)); }); });
Or we could align db::serializer<>::read() so that they're like rpc
deserializers wrt to output parameter.I think your fix is good. Serializable class should be easily movable.
Gleb.
from scylladb.
Related Issues (20)
- ninja: error: unknown target 'build/dev/scylla' HOT 2
- run nodetool decomission to remove node from scylla cluster, the remain nodes' cpu is very high HOT 1
- [object-storage, tablets]: Integrated backup for tablets-enabled keyspaces
- [object-storage, tablets]: Integrated restore for tablets-enabled keyspaces
- 5.4.6/dtest-debug TestRepairAdditional.test_repair_ttl_update failure: 'sstable dump-data --merge' returned non-zero result HOT 1
- Reclaimed bloom filter is left back in disk when the SSTable is deleted HOT 2
- 5.4.6/dtest-debug test_remove_field_with_cdc[Single_cluster] failure: Error from server: code=0000 [Server error] message="std::exception HOT 3
- 5.4.6/dtest-debug test_nodes_rejoining_a_cluster_synch_on_schema failure with AssertionError HOT 2
- 5.4.6/dtest-debug: test_update_schema_while_node_is_killed[alter_table] fails with 'AssertionError: Expected 4 columns but got rows' HOT 1
- 5.4.6/dtest-debug: test_updated_shards_during_add_decommission_node fails (timeout?) HOT 1
- True snapshot size discrepancy for global vs per-table APIs
- Implement function `commitlog_recover`. HOT 2
- RFC: Remove Thrift support HOT 2
- [debug, aarch64] topology.test_change_ip failed with `AssertionError` HOT 4
- 5.2.18/dtest-debug: test_mv_resurrected_rows_after_decommission_interrupt[with_rbno] fails on assert 1 == 0 HOT 2
- `test_tablets_migration` takes 12 minutes in debug mode HOT 5
- Wrong exception is printed in build step exception handling
- dtest test_do_not_finish_view_building_with_hints fails with tablets HOT 1
- `nodetool removenode` may fail if we concurrently try to do `DROP INDEX...` resulting in leaving a dead DB node as part of the DB cluster HOT 2
- initial_tablets update only take effect after restart
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scylladb.