Dependabot/cargo/mongodb 3.0.1#36
Conversation
|
This should implement See: #16 |
|
Updating the MongoDB driver version should be separate from adapting to the new API of Tower Sessions. It shouldn't be coupled together, right? |
|
I disagree. There's no point in updating a broken implementation. If it can't be implemented then it should be abandoned altogether. |
|
I understand your point, but I'd argue that Tower Sessions doesn't force you to implement the create method, it just recommends it. async fn create(&self, session_record: &mut Record) -> Result<()> {
default_create(self, session_record).await
}
async fn default_create<S: SessionStore + ?Sized>(
store: &S,
session_record: &mut Record,
) -> Result<()> {
tracing::warn!(
"The default implementation of `SessionStore::create` is being used, which relies on \
`SessionStore::save`. To properly handle potential ID collisions, it is recommended that \
stores implement their own version of `SessionStore::create`."
);
store.save(session_record).await?;
Ok(())
}To wrap up and as a possible idea, I think the only way to avoid possible ID collisions is to generate our unique ids. Using UUIDs or MongoDB Object IDs could be enough. I hope a viable solution could be found. |
|
It only doesn't require it for compatibility reasons (and in the near future it will be required). But make no mistake: any implementation that doesn't provide |
Updates the requirements on [mongodb](https://github.com/mongodb/mongo-rust-driver) to permit the latest version. - [Release notes](https://github.com/mongodb/mongo-rust-driver/releases) - [Commits](mongodb/mongo-rust-driver@v2.7.0...v3.0.1) --- updated-dependencies: - dependency-name: mongodb dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
No description provided.