Comments (4)
No, this is not expected and indexes should not be recreated.
please provide the entity class sample which you did above but along with the properties declaration
from cassandra-driver-mapping.
@Table(name = "messages_by_conversation", //
indexes = { @Index(columnList = "msgid"), @Index(columnList = "resource"), @Index(columnList = "senderid") })
@TableProperties(values = { @TableProperty("CLUSTERING ORDER BY (deletedOn ASC, timeSent DESC)") })
public class MessagesByConversation {
@EmbeddedId
private ConversationMessageKey key;
@Column(columnDefinition = "timeuuid")
private UUID msgId;
@Column
private String resource;
@Column
private String xmppId;
@Column
private String xmppThreadId;
@Column(columnDefinition = "timeuuid")
private UUID senderId;
@Column
private String content;
@Column
private Map<UUID, String> addresses;
}
public class ConversationMessageKey {
@Column(columnDefinition = "timeuuid")
private UUID convId;
@Column
private long deletedOn = 0;
@Column
private long timeSent;
}
For briefness I've removed the getters/setters but they all follow the same pattern as follows
public ConversationMessageKey getKey() {
return key;
}
public MessagesByConversation setKey(ConversationMessageKey value) {
key = value;
return this;
}
from cassandra-driver-mapping.
BTW, I have the system.log file from a period where the app started that shows the creation/initialization of the indexes. Problem is I don't know how to attach it to the issue, seems I can only attach images, not text files. If you would like a copy of the log, let me know, along with where I can send it, and I'll get it to you.
from cassandra-driver-mapping.
I figured the issue:
you don't have name for indexes and that's why my program was recreating it each time. CZ name on entity didn't match with name in cassandra.
I pushed fix to not recreate the index for the column if it's already in cassandra.
Please reload from maven.
p.s.
Giving a name to index would also fix it.
from cassandra-driver-mapping.
Related Issues (20)
- Getting UncheckedExecutionException when using get method
- NoHostAvailableException when column family is unconfigured HOT 2
- Possible Exceptions while performing DB operation using Valchkou HOT 4
- Timeline for 2.1.7 HOT 3
- Getting error while using BatchExecutor for multible tables using condition IF NOT EXIST HOT 4
- Adding a new column of type list<String> and renaming existing column at the same time (in a single entity) made the schema go into a weird state HOT 12
- Batch Executor is thread safe or not HOT 4
- cassandra version vs cassandra-driver HOT 3
- DSE SPARK HOT 1
- Delete does not take any options HOT 4
- "Re-preparing already prepared query" when using Mapper CRUD HOT 1
- Accessor-annotated interfaces and PagingState
- Project status HOT 4
- Lists returning empty after upgrading to version 3.0.0 HOT 4
- EntityTypeParser ignores @Transient annotation on enum fields HOT 1
- Custom codec support
- PRIMARY key migration sync isn't working HOT 2
- Kotlin entities are not created on get HOT 1
- @embeddable or @UDT support
- Support for Java Driver 4.X HOT 1
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 cassandra-driver-mapping.